summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/referrer-policy
diff options
context:
space:
mode:
Diffstat (limited to 'testing/web-platform/tests/referrer-policy')
-rw-r--r--testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/no-referrer-when-downgrade/a-tag.http.html63
-rw-r--r--testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/no-referrer-when-downgrade/a-tag.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/no-referrer-when-downgrade/fetch.http.html143
-rw-r--r--testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/no-referrer-when-downgrade/fetch.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/no-referrer-when-downgrade/iframe-tag.http.html143
-rw-r--r--testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/no-referrer-when-downgrade/iframe-tag.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/no-referrer-when-downgrade/img-tag.http.html143
-rw-r--r--testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/no-referrer-when-downgrade/img-tag.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/no-referrer-when-downgrade/script-tag.http.html143
-rw-r--r--testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/no-referrer-when-downgrade/script-tag.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/no-referrer-when-downgrade/sharedworker-classic.http.html43
-rw-r--r--testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/no-referrer-when-downgrade/sharedworker-classic.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/no-referrer-when-downgrade/worker-classic.http.html43
-rw-r--r--testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/no-referrer-when-downgrade/worker-classic.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/no-referrer-when-downgrade/worker-module.http.html43
-rw-r--r--testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/no-referrer-when-downgrade/worker-module.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/no-referrer-when-downgrade/xhr.http.html143
-rw-r--r--testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/no-referrer-when-downgrade/xhr.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/origin-when-cross-origin/a-tag.http.html33
-rw-r--r--testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/origin-when-cross-origin/a-tag.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/origin-when-cross-origin/fetch.http.html43
-rw-r--r--testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/origin-when-cross-origin/fetch.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/origin-when-cross-origin/iframe-tag.http.html43
-rw-r--r--testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/origin-when-cross-origin/iframe-tag.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/origin-when-cross-origin/img-tag.http.html43
-rw-r--r--testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/origin-when-cross-origin/img-tag.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/origin-when-cross-origin/script-tag.http.html43
-rw-r--r--testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/origin-when-cross-origin/script-tag.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/origin-when-cross-origin/sharedworker-classic.http.html43
-rw-r--r--testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/origin-when-cross-origin/sharedworker-classic.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/origin-when-cross-origin/worker-classic.http.html43
-rw-r--r--testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/origin-when-cross-origin/worker-classic.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/origin-when-cross-origin/worker-module.http.html43
-rw-r--r--testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/origin-when-cross-origin/worker-module.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/origin-when-cross-origin/xhr.http.html43
-rw-r--r--testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/origin-when-cross-origin/xhr.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/same-origin/a-tag.http.html33
-rw-r--r--testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/same-origin/a-tag.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/same-origin/fetch.http.html43
-rw-r--r--testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/same-origin/fetch.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/same-origin/iframe-tag.http.html43
-rw-r--r--testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/same-origin/iframe-tag.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/same-origin/img-tag.http.html43
-rw-r--r--testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/same-origin/img-tag.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/same-origin/script-tag.http.html43
-rw-r--r--testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/same-origin/script-tag.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/same-origin/sharedworker-classic.http.html43
-rw-r--r--testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/same-origin/sharedworker-classic.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/same-origin/worker-classic.http.html43
-rw-r--r--testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/same-origin/worker-classic.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/same-origin/worker-module.http.html43
-rw-r--r--testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/same-origin/worker-module.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/same-origin/xhr.http.html43
-rw-r--r--testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/same-origin/xhr.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/strict-origin-when-cross-origin/a-tag.http.html33
-rw-r--r--testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/strict-origin-when-cross-origin/a-tag.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/strict-origin-when-cross-origin/fetch.http.html43
-rw-r--r--testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/strict-origin-when-cross-origin/fetch.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/strict-origin-when-cross-origin/iframe-tag.http.html43
-rw-r--r--testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/strict-origin-when-cross-origin/iframe-tag.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/strict-origin-when-cross-origin/img-tag.http.html43
-rw-r--r--testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/strict-origin-when-cross-origin/img-tag.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/strict-origin-when-cross-origin/script-tag.http.html43
-rw-r--r--testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/strict-origin-when-cross-origin/script-tag.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/strict-origin-when-cross-origin/sharedworker-classic.http.html43
-rw-r--r--testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/strict-origin-when-cross-origin/sharedworker-classic.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/strict-origin-when-cross-origin/worker-classic.http.html43
-rw-r--r--testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/strict-origin-when-cross-origin/worker-classic.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/strict-origin-when-cross-origin/worker-module.http.html43
-rw-r--r--testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/strict-origin-when-cross-origin/worker-module.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/strict-origin-when-cross-origin/xhr.http.html43
-rw-r--r--testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/strict-origin-when-cross-origin/xhr.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/unsafe-url/a-tag.http.html63
-rw-r--r--testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/unsafe-url/a-tag.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/unsafe-url/fetch.http.html143
-rw-r--r--testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/unsafe-url/fetch.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/unsafe-url/iframe-tag.http.html143
-rw-r--r--testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/unsafe-url/iframe-tag.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/unsafe-url/img-tag.http.html143
-rw-r--r--testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/unsafe-url/img-tag.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/unsafe-url/script-tag.http.html143
-rw-r--r--testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/unsafe-url/script-tag.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/unsafe-url/sharedworker-classic.http.html43
-rw-r--r--testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/unsafe-url/sharedworker-classic.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/unsafe-url/worker-classic.http.html43
-rw-r--r--testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/unsafe-url/worker-classic.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/unsafe-url/worker-module.http.html43
-rw-r--r--testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/unsafe-url/worker-module.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/unsafe-url/xhr.http.html143
-rw-r--r--testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/unsafe-url/xhr.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/unset/a-tag.http.html33
-rw-r--r--testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/unset/fetch.http.html43
-rw-r--r--testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/unset/iframe-tag.http.html43
-rw-r--r--testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/unset/img-tag.http.html43
-rw-r--r--testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/unset/script-tag.http.html43
-rw-r--r--testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/unset/sharedworker-classic.http.html43
-rw-r--r--testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/unset/worker-classic.http.html43
-rw-r--r--testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/unset/worker-module.http.html43
-rw-r--r--testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/unset/xhr.http.html43
-rw-r--r--testing/web-platform/tests/referrer-policy/4K+1/gen/top.meta/no-referrer-when-downgrade/a-tag.http.html64
-rw-r--r--testing/web-platform/tests/referrer-policy/4K+1/gen/top.meta/no-referrer-when-downgrade/fetch.http.html144
-rw-r--r--testing/web-platform/tests/referrer-policy/4K+1/gen/top.meta/no-referrer-when-downgrade/iframe-tag.http.html144
-rw-r--r--testing/web-platform/tests/referrer-policy/4K+1/gen/top.meta/no-referrer-when-downgrade/img-tag.http.html144
-rw-r--r--testing/web-platform/tests/referrer-policy/4K+1/gen/top.meta/no-referrer-when-downgrade/script-tag.http.html144
-rw-r--r--testing/web-platform/tests/referrer-policy/4K+1/gen/top.meta/no-referrer-when-downgrade/sharedworker-classic.http.html44
-rw-r--r--testing/web-platform/tests/referrer-policy/4K+1/gen/top.meta/no-referrer-when-downgrade/worker-classic.http.html44
-rw-r--r--testing/web-platform/tests/referrer-policy/4K+1/gen/top.meta/no-referrer-when-downgrade/worker-module.http.html44
-rw-r--r--testing/web-platform/tests/referrer-policy/4K+1/gen/top.meta/no-referrer-when-downgrade/xhr.http.html144
-rw-r--r--testing/web-platform/tests/referrer-policy/4K+1/gen/top.meta/origin-when-cross-origin/a-tag.http.html34
-rw-r--r--testing/web-platform/tests/referrer-policy/4K+1/gen/top.meta/origin-when-cross-origin/fetch.http.html44
-rw-r--r--testing/web-platform/tests/referrer-policy/4K+1/gen/top.meta/origin-when-cross-origin/iframe-tag.http.html44
-rw-r--r--testing/web-platform/tests/referrer-policy/4K+1/gen/top.meta/origin-when-cross-origin/img-tag.http.html44
-rw-r--r--testing/web-platform/tests/referrer-policy/4K+1/gen/top.meta/origin-when-cross-origin/script-tag.http.html44
-rw-r--r--testing/web-platform/tests/referrer-policy/4K+1/gen/top.meta/origin-when-cross-origin/sharedworker-classic.http.html44
-rw-r--r--testing/web-platform/tests/referrer-policy/4K+1/gen/top.meta/origin-when-cross-origin/worker-classic.http.html44
-rw-r--r--testing/web-platform/tests/referrer-policy/4K+1/gen/top.meta/origin-when-cross-origin/worker-module.http.html44
-rw-r--r--testing/web-platform/tests/referrer-policy/4K+1/gen/top.meta/origin-when-cross-origin/xhr.http.html44
-rw-r--r--testing/web-platform/tests/referrer-policy/4K+1/gen/top.meta/same-origin/a-tag.http.html34
-rw-r--r--testing/web-platform/tests/referrer-policy/4K+1/gen/top.meta/same-origin/fetch.http.html44
-rw-r--r--testing/web-platform/tests/referrer-policy/4K+1/gen/top.meta/same-origin/iframe-tag.http.html44
-rw-r--r--testing/web-platform/tests/referrer-policy/4K+1/gen/top.meta/same-origin/img-tag.http.html44
-rw-r--r--testing/web-platform/tests/referrer-policy/4K+1/gen/top.meta/same-origin/script-tag.http.html44
-rw-r--r--testing/web-platform/tests/referrer-policy/4K+1/gen/top.meta/same-origin/sharedworker-classic.http.html44
-rw-r--r--testing/web-platform/tests/referrer-policy/4K+1/gen/top.meta/same-origin/worker-classic.http.html44
-rw-r--r--testing/web-platform/tests/referrer-policy/4K+1/gen/top.meta/same-origin/worker-module.http.html44
-rw-r--r--testing/web-platform/tests/referrer-policy/4K+1/gen/top.meta/same-origin/xhr.http.html44
-rw-r--r--testing/web-platform/tests/referrer-policy/4K+1/gen/top.meta/strict-origin-when-cross-origin/a-tag.http.html34
-rw-r--r--testing/web-platform/tests/referrer-policy/4K+1/gen/top.meta/strict-origin-when-cross-origin/fetch.http.html44
-rw-r--r--testing/web-platform/tests/referrer-policy/4K+1/gen/top.meta/strict-origin-when-cross-origin/iframe-tag.http.html44
-rw-r--r--testing/web-platform/tests/referrer-policy/4K+1/gen/top.meta/strict-origin-when-cross-origin/img-tag.http.html44
-rw-r--r--testing/web-platform/tests/referrer-policy/4K+1/gen/top.meta/strict-origin-when-cross-origin/script-tag.http.html44
-rw-r--r--testing/web-platform/tests/referrer-policy/4K+1/gen/top.meta/strict-origin-when-cross-origin/sharedworker-classic.http.html44
-rw-r--r--testing/web-platform/tests/referrer-policy/4K+1/gen/top.meta/strict-origin-when-cross-origin/worker-classic.http.html44
-rw-r--r--testing/web-platform/tests/referrer-policy/4K+1/gen/top.meta/strict-origin-when-cross-origin/worker-module.http.html44
-rw-r--r--testing/web-platform/tests/referrer-policy/4K+1/gen/top.meta/strict-origin-when-cross-origin/xhr.http.html44
-rw-r--r--testing/web-platform/tests/referrer-policy/4K+1/gen/top.meta/unsafe-url/a-tag.http.html64
-rw-r--r--testing/web-platform/tests/referrer-policy/4K+1/gen/top.meta/unsafe-url/fetch.http.html144
-rw-r--r--testing/web-platform/tests/referrer-policy/4K+1/gen/top.meta/unsafe-url/iframe-tag.http.html144
-rw-r--r--testing/web-platform/tests/referrer-policy/4K+1/gen/top.meta/unsafe-url/img-tag.http.html144
-rw-r--r--testing/web-platform/tests/referrer-policy/4K+1/gen/top.meta/unsafe-url/script-tag.http.html144
-rw-r--r--testing/web-platform/tests/referrer-policy/4K+1/gen/top.meta/unsafe-url/sharedworker-classic.http.html44
-rw-r--r--testing/web-platform/tests/referrer-policy/4K+1/gen/top.meta/unsafe-url/worker-classic.http.html44
-rw-r--r--testing/web-platform/tests/referrer-policy/4K+1/gen/top.meta/unsafe-url/worker-module.http.html44
-rw-r--r--testing/web-platform/tests/referrer-policy/4K+1/gen/top.meta/unsafe-url/xhr.http.html144
-rw-r--r--testing/web-platform/tests/referrer-policy/4K+1/gen/top.meta/unset/a-tag.http.html33
-rw-r--r--testing/web-platform/tests/referrer-policy/4K+1/gen/top.meta/unset/fetch.http.html43
-rw-r--r--testing/web-platform/tests/referrer-policy/4K+1/gen/top.meta/unset/iframe-tag.http.html43
-rw-r--r--testing/web-platform/tests/referrer-policy/4K+1/gen/top.meta/unset/img-tag.http.html43
-rw-r--r--testing/web-platform/tests/referrer-policy/4K+1/gen/top.meta/unset/script-tag.http.html43
-rw-r--r--testing/web-platform/tests/referrer-policy/4K+1/gen/top.meta/unset/sharedworker-classic.http.html43
-rw-r--r--testing/web-platform/tests/referrer-policy/4K+1/gen/top.meta/unset/worker-classic.http.html43
-rw-r--r--testing/web-platform/tests/referrer-policy/4K+1/gen/top.meta/unset/worker-module.http.html43
-rw-r--r--testing/web-platform/tests/referrer-policy/4K+1/gen/top.meta/unset/xhr.http.html43
-rw-r--r--testing/web-platform/tests/referrer-policy/4K+1/generic/test-case.sub.js20
-rw-r--r--testing/web-platform/tests/referrer-policy/4K+1/spec.src.json52
-rw-r--r--testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/no-referrer-when-downgrade/a-tag.http.html63
-rw-r--r--testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/no-referrer-when-downgrade/a-tag.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/no-referrer-when-downgrade/fetch.http.html143
-rw-r--r--testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/no-referrer-when-downgrade/fetch.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/no-referrer-when-downgrade/iframe-tag.http.html143
-rw-r--r--testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/no-referrer-when-downgrade/iframe-tag.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/no-referrer-when-downgrade/img-tag.http.html143
-rw-r--r--testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/no-referrer-when-downgrade/img-tag.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/no-referrer-when-downgrade/script-tag.http.html143
-rw-r--r--testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/no-referrer-when-downgrade/script-tag.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/no-referrer-when-downgrade/sharedworker-classic.http.html43
-rw-r--r--testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/no-referrer-when-downgrade/sharedworker-classic.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/no-referrer-when-downgrade/worker-classic.http.html43
-rw-r--r--testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/no-referrer-when-downgrade/worker-classic.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/no-referrer-when-downgrade/worker-module.http.html43
-rw-r--r--testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/no-referrer-when-downgrade/worker-module.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/no-referrer-when-downgrade/xhr.http.html143
-rw-r--r--testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/no-referrer-when-downgrade/xhr.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/origin-when-cross-origin/a-tag.http.html33
-rw-r--r--testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/origin-when-cross-origin/a-tag.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/origin-when-cross-origin/fetch.http.html43
-rw-r--r--testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/origin-when-cross-origin/fetch.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/origin-when-cross-origin/iframe-tag.http.html43
-rw-r--r--testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/origin-when-cross-origin/iframe-tag.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/origin-when-cross-origin/img-tag.http.html43
-rw-r--r--testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/origin-when-cross-origin/img-tag.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/origin-when-cross-origin/script-tag.http.html43
-rw-r--r--testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/origin-when-cross-origin/script-tag.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/origin-when-cross-origin/sharedworker-classic.http.html43
-rw-r--r--testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/origin-when-cross-origin/sharedworker-classic.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/origin-when-cross-origin/worker-classic.http.html43
-rw-r--r--testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/origin-when-cross-origin/worker-classic.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/origin-when-cross-origin/worker-module.http.html43
-rw-r--r--testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/origin-when-cross-origin/worker-module.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/origin-when-cross-origin/xhr.http.html43
-rw-r--r--testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/origin-when-cross-origin/xhr.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/same-origin/a-tag.http.html33
-rw-r--r--testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/same-origin/a-tag.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/same-origin/fetch.http.html43
-rw-r--r--testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/same-origin/fetch.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/same-origin/iframe-tag.http.html43
-rw-r--r--testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/same-origin/iframe-tag.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/same-origin/img-tag.http.html43
-rw-r--r--testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/same-origin/img-tag.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/same-origin/script-tag.http.html43
-rw-r--r--testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/same-origin/script-tag.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/same-origin/sharedworker-classic.http.html43
-rw-r--r--testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/same-origin/sharedworker-classic.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/same-origin/worker-classic.http.html43
-rw-r--r--testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/same-origin/worker-classic.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/same-origin/worker-module.http.html43
-rw-r--r--testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/same-origin/worker-module.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/same-origin/xhr.http.html43
-rw-r--r--testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/same-origin/xhr.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/strict-origin-when-cross-origin/a-tag.http.html33
-rw-r--r--testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/strict-origin-when-cross-origin/a-tag.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/strict-origin-when-cross-origin/fetch.http.html43
-rw-r--r--testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/strict-origin-when-cross-origin/fetch.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/strict-origin-when-cross-origin/iframe-tag.http.html43
-rw-r--r--testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/strict-origin-when-cross-origin/iframe-tag.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/strict-origin-when-cross-origin/img-tag.http.html43
-rw-r--r--testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/strict-origin-when-cross-origin/img-tag.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/strict-origin-when-cross-origin/script-tag.http.html43
-rw-r--r--testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/strict-origin-when-cross-origin/script-tag.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/strict-origin-when-cross-origin/sharedworker-classic.http.html43
-rw-r--r--testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/strict-origin-when-cross-origin/sharedworker-classic.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/strict-origin-when-cross-origin/worker-classic.http.html43
-rw-r--r--testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/strict-origin-when-cross-origin/worker-classic.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/strict-origin-when-cross-origin/worker-module.http.html43
-rw-r--r--testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/strict-origin-when-cross-origin/worker-module.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/strict-origin-when-cross-origin/xhr.http.html43
-rw-r--r--testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/strict-origin-when-cross-origin/xhr.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/unsafe-url/a-tag.http.html63
-rw-r--r--testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/unsafe-url/a-tag.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/unsafe-url/fetch.http.html143
-rw-r--r--testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/unsafe-url/fetch.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/unsafe-url/iframe-tag.http.html143
-rw-r--r--testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/unsafe-url/iframe-tag.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/unsafe-url/img-tag.http.html143
-rw-r--r--testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/unsafe-url/img-tag.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/unsafe-url/script-tag.http.html143
-rw-r--r--testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/unsafe-url/script-tag.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/unsafe-url/sharedworker-classic.http.html43
-rw-r--r--testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/unsafe-url/sharedworker-classic.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/unsafe-url/worker-classic.http.html43
-rw-r--r--testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/unsafe-url/worker-classic.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/unsafe-url/worker-module.http.html43
-rw-r--r--testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/unsafe-url/worker-module.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/unsafe-url/xhr.http.html143
-rw-r--r--testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/unsafe-url/xhr.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/unset/a-tag.http.html33
-rw-r--r--testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/unset/fetch.http.html43
-rw-r--r--testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/unset/iframe-tag.http.html43
-rw-r--r--testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/unset/img-tag.http.html43
-rw-r--r--testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/unset/script-tag.http.html43
-rw-r--r--testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/unset/sharedworker-classic.http.html43
-rw-r--r--testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/unset/worker-classic.http.html43
-rw-r--r--testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/unset/worker-module.http.html43
-rw-r--r--testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/unset/xhr.http.html43
-rw-r--r--testing/web-platform/tests/referrer-policy/4K-1/gen/top.meta/no-referrer-when-downgrade/a-tag.http.html64
-rw-r--r--testing/web-platform/tests/referrer-policy/4K-1/gen/top.meta/no-referrer-when-downgrade/fetch.http.html144
-rw-r--r--testing/web-platform/tests/referrer-policy/4K-1/gen/top.meta/no-referrer-when-downgrade/iframe-tag.http.html144
-rw-r--r--testing/web-platform/tests/referrer-policy/4K-1/gen/top.meta/no-referrer-when-downgrade/img-tag.http.html144
-rw-r--r--testing/web-platform/tests/referrer-policy/4K-1/gen/top.meta/no-referrer-when-downgrade/script-tag.http.html144
-rw-r--r--testing/web-platform/tests/referrer-policy/4K-1/gen/top.meta/no-referrer-when-downgrade/sharedworker-classic.http.html44
-rw-r--r--testing/web-platform/tests/referrer-policy/4K-1/gen/top.meta/no-referrer-when-downgrade/worker-classic.http.html44
-rw-r--r--testing/web-platform/tests/referrer-policy/4K-1/gen/top.meta/no-referrer-when-downgrade/worker-module.http.html44
-rw-r--r--testing/web-platform/tests/referrer-policy/4K-1/gen/top.meta/no-referrer-when-downgrade/xhr.http.html144
-rw-r--r--testing/web-platform/tests/referrer-policy/4K-1/gen/top.meta/origin-when-cross-origin/a-tag.http.html34
-rw-r--r--testing/web-platform/tests/referrer-policy/4K-1/gen/top.meta/origin-when-cross-origin/fetch.http.html44
-rw-r--r--testing/web-platform/tests/referrer-policy/4K-1/gen/top.meta/origin-when-cross-origin/iframe-tag.http.html44
-rw-r--r--testing/web-platform/tests/referrer-policy/4K-1/gen/top.meta/origin-when-cross-origin/img-tag.http.html44
-rw-r--r--testing/web-platform/tests/referrer-policy/4K-1/gen/top.meta/origin-when-cross-origin/script-tag.http.html44
-rw-r--r--testing/web-platform/tests/referrer-policy/4K-1/gen/top.meta/origin-when-cross-origin/sharedworker-classic.http.html44
-rw-r--r--testing/web-platform/tests/referrer-policy/4K-1/gen/top.meta/origin-when-cross-origin/worker-classic.http.html44
-rw-r--r--testing/web-platform/tests/referrer-policy/4K-1/gen/top.meta/origin-when-cross-origin/worker-module.http.html44
-rw-r--r--testing/web-platform/tests/referrer-policy/4K-1/gen/top.meta/origin-when-cross-origin/xhr.http.html44
-rw-r--r--testing/web-platform/tests/referrer-policy/4K-1/gen/top.meta/same-origin/a-tag.http.html34
-rw-r--r--testing/web-platform/tests/referrer-policy/4K-1/gen/top.meta/same-origin/fetch.http.html44
-rw-r--r--testing/web-platform/tests/referrer-policy/4K-1/gen/top.meta/same-origin/iframe-tag.http.html44
-rw-r--r--testing/web-platform/tests/referrer-policy/4K-1/gen/top.meta/same-origin/img-tag.http.html44
-rw-r--r--testing/web-platform/tests/referrer-policy/4K-1/gen/top.meta/same-origin/script-tag.http.html44
-rw-r--r--testing/web-platform/tests/referrer-policy/4K-1/gen/top.meta/same-origin/sharedworker-classic.http.html44
-rw-r--r--testing/web-platform/tests/referrer-policy/4K-1/gen/top.meta/same-origin/worker-classic.http.html44
-rw-r--r--testing/web-platform/tests/referrer-policy/4K-1/gen/top.meta/same-origin/worker-module.http.html44
-rw-r--r--testing/web-platform/tests/referrer-policy/4K-1/gen/top.meta/same-origin/xhr.http.html44
-rw-r--r--testing/web-platform/tests/referrer-policy/4K-1/gen/top.meta/strict-origin-when-cross-origin/a-tag.http.html34
-rw-r--r--testing/web-platform/tests/referrer-policy/4K-1/gen/top.meta/strict-origin-when-cross-origin/fetch.http.html44
-rw-r--r--testing/web-platform/tests/referrer-policy/4K-1/gen/top.meta/strict-origin-when-cross-origin/iframe-tag.http.html44
-rw-r--r--testing/web-platform/tests/referrer-policy/4K-1/gen/top.meta/strict-origin-when-cross-origin/img-tag.http.html44
-rw-r--r--testing/web-platform/tests/referrer-policy/4K-1/gen/top.meta/strict-origin-when-cross-origin/script-tag.http.html44
-rw-r--r--testing/web-platform/tests/referrer-policy/4K-1/gen/top.meta/strict-origin-when-cross-origin/sharedworker-classic.http.html44
-rw-r--r--testing/web-platform/tests/referrer-policy/4K-1/gen/top.meta/strict-origin-when-cross-origin/worker-classic.http.html44
-rw-r--r--testing/web-platform/tests/referrer-policy/4K-1/gen/top.meta/strict-origin-when-cross-origin/worker-module.http.html44
-rw-r--r--testing/web-platform/tests/referrer-policy/4K-1/gen/top.meta/strict-origin-when-cross-origin/xhr.http.html44
-rw-r--r--testing/web-platform/tests/referrer-policy/4K-1/gen/top.meta/unsafe-url/a-tag.http.html64
-rw-r--r--testing/web-platform/tests/referrer-policy/4K-1/gen/top.meta/unsafe-url/fetch.http.html144
-rw-r--r--testing/web-platform/tests/referrer-policy/4K-1/gen/top.meta/unsafe-url/iframe-tag.http.html144
-rw-r--r--testing/web-platform/tests/referrer-policy/4K-1/gen/top.meta/unsafe-url/img-tag.http.html144
-rw-r--r--testing/web-platform/tests/referrer-policy/4K-1/gen/top.meta/unsafe-url/script-tag.http.html144
-rw-r--r--testing/web-platform/tests/referrer-policy/4K-1/gen/top.meta/unsafe-url/sharedworker-classic.http.html44
-rw-r--r--testing/web-platform/tests/referrer-policy/4K-1/gen/top.meta/unsafe-url/worker-classic.http.html44
-rw-r--r--testing/web-platform/tests/referrer-policy/4K-1/gen/top.meta/unsafe-url/worker-module.http.html44
-rw-r--r--testing/web-platform/tests/referrer-policy/4K-1/gen/top.meta/unsafe-url/xhr.http.html144
-rw-r--r--testing/web-platform/tests/referrer-policy/4K-1/gen/top.meta/unset/a-tag.http.html33
-rw-r--r--testing/web-platform/tests/referrer-policy/4K-1/gen/top.meta/unset/fetch.http.html43
-rw-r--r--testing/web-platform/tests/referrer-policy/4K-1/gen/top.meta/unset/iframe-tag.http.html43
-rw-r--r--testing/web-platform/tests/referrer-policy/4K-1/gen/top.meta/unset/img-tag.http.html43
-rw-r--r--testing/web-platform/tests/referrer-policy/4K-1/gen/top.meta/unset/script-tag.http.html43
-rw-r--r--testing/web-platform/tests/referrer-policy/4K-1/gen/top.meta/unset/sharedworker-classic.http.html43
-rw-r--r--testing/web-platform/tests/referrer-policy/4K-1/gen/top.meta/unset/worker-classic.http.html43
-rw-r--r--testing/web-platform/tests/referrer-policy/4K-1/gen/top.meta/unset/worker-module.http.html43
-rw-r--r--testing/web-platform/tests/referrer-policy/4K-1/gen/top.meta/unset/xhr.http.html43
-rw-r--r--testing/web-platform/tests/referrer-policy/4K-1/generic/test-case.sub.js20
-rw-r--r--testing/web-platform/tests/referrer-policy/4K-1/spec.src.json52
-rw-r--r--testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/no-referrer-when-downgrade/a-tag.http.html63
-rw-r--r--testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/no-referrer-when-downgrade/a-tag.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/no-referrer-when-downgrade/fetch.http.html143
-rw-r--r--testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/no-referrer-when-downgrade/fetch.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/no-referrer-when-downgrade/iframe-tag.http.html143
-rw-r--r--testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/no-referrer-when-downgrade/iframe-tag.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/no-referrer-when-downgrade/img-tag.http.html143
-rw-r--r--testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/no-referrer-when-downgrade/img-tag.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/no-referrer-when-downgrade/script-tag.http.html143
-rw-r--r--testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/no-referrer-when-downgrade/script-tag.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/no-referrer-when-downgrade/sharedworker-classic.http.html43
-rw-r--r--testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/no-referrer-when-downgrade/sharedworker-classic.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/no-referrer-when-downgrade/worker-classic.http.html43
-rw-r--r--testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/no-referrer-when-downgrade/worker-classic.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/no-referrer-when-downgrade/worker-module.http.html43
-rw-r--r--testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/no-referrer-when-downgrade/worker-module.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/no-referrer-when-downgrade/xhr.http.html143
-rw-r--r--testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/no-referrer-when-downgrade/xhr.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/origin-when-cross-origin/a-tag.http.html33
-rw-r--r--testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/origin-when-cross-origin/a-tag.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/origin-when-cross-origin/fetch.http.html43
-rw-r--r--testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/origin-when-cross-origin/fetch.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/origin-when-cross-origin/iframe-tag.http.html43
-rw-r--r--testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/origin-when-cross-origin/iframe-tag.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/origin-when-cross-origin/img-tag.http.html43
-rw-r--r--testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/origin-when-cross-origin/img-tag.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/origin-when-cross-origin/script-tag.http.html43
-rw-r--r--testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/origin-when-cross-origin/script-tag.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/origin-when-cross-origin/sharedworker-classic.http.html43
-rw-r--r--testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/origin-when-cross-origin/sharedworker-classic.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/origin-when-cross-origin/worker-classic.http.html43
-rw-r--r--testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/origin-when-cross-origin/worker-classic.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/origin-when-cross-origin/worker-module.http.html43
-rw-r--r--testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/origin-when-cross-origin/worker-module.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/origin-when-cross-origin/xhr.http.html43
-rw-r--r--testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/origin-when-cross-origin/xhr.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/same-origin/a-tag.http.html33
-rw-r--r--testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/same-origin/a-tag.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/same-origin/fetch.http.html43
-rw-r--r--testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/same-origin/fetch.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/same-origin/iframe-tag.http.html43
-rw-r--r--testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/same-origin/iframe-tag.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/same-origin/img-tag.http.html43
-rw-r--r--testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/same-origin/img-tag.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/same-origin/script-tag.http.html43
-rw-r--r--testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/same-origin/script-tag.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/same-origin/sharedworker-classic.http.html43
-rw-r--r--testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/same-origin/sharedworker-classic.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/same-origin/worker-classic.http.html43
-rw-r--r--testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/same-origin/worker-classic.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/same-origin/worker-module.http.html43
-rw-r--r--testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/same-origin/worker-module.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/same-origin/xhr.http.html43
-rw-r--r--testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/same-origin/xhr.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/strict-origin-when-cross-origin/a-tag.http.html33
-rw-r--r--testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/strict-origin-when-cross-origin/a-tag.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/strict-origin-when-cross-origin/fetch.http.html43
-rw-r--r--testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/strict-origin-when-cross-origin/fetch.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/strict-origin-when-cross-origin/iframe-tag.http.html43
-rw-r--r--testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/strict-origin-when-cross-origin/iframe-tag.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/strict-origin-when-cross-origin/img-tag.http.html43
-rw-r--r--testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/strict-origin-when-cross-origin/img-tag.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/strict-origin-when-cross-origin/script-tag.http.html43
-rw-r--r--testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/strict-origin-when-cross-origin/script-tag.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/strict-origin-when-cross-origin/sharedworker-classic.http.html43
-rw-r--r--testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/strict-origin-when-cross-origin/sharedworker-classic.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/strict-origin-when-cross-origin/worker-classic.http.html43
-rw-r--r--testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/strict-origin-when-cross-origin/worker-classic.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/strict-origin-when-cross-origin/worker-module.http.html43
-rw-r--r--testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/strict-origin-when-cross-origin/worker-module.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/strict-origin-when-cross-origin/xhr.http.html43
-rw-r--r--testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/strict-origin-when-cross-origin/xhr.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/unsafe-url/a-tag.http.html63
-rw-r--r--testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/unsafe-url/a-tag.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/unsafe-url/fetch.http.html143
-rw-r--r--testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/unsafe-url/fetch.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/unsafe-url/iframe-tag.http.html143
-rw-r--r--testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/unsafe-url/iframe-tag.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/unsafe-url/img-tag.http.html143
-rw-r--r--testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/unsafe-url/img-tag.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/unsafe-url/script-tag.http.html143
-rw-r--r--testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/unsafe-url/script-tag.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/unsafe-url/sharedworker-classic.http.html43
-rw-r--r--testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/unsafe-url/sharedworker-classic.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/unsafe-url/worker-classic.http.html43
-rw-r--r--testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/unsafe-url/worker-classic.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/unsafe-url/worker-module.http.html43
-rw-r--r--testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/unsafe-url/worker-module.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/unsafe-url/xhr.http.html143
-rw-r--r--testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/unsafe-url/xhr.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/unset/a-tag.http.html33
-rw-r--r--testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/unset/fetch.http.html43
-rw-r--r--testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/unset/iframe-tag.http.html43
-rw-r--r--testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/unset/img-tag.http.html43
-rw-r--r--testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/unset/script-tag.http.html43
-rw-r--r--testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/unset/sharedworker-classic.http.html43
-rw-r--r--testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/unset/worker-classic.http.html43
-rw-r--r--testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/unset/worker-module.http.html43
-rw-r--r--testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/unset/xhr.http.html43
-rw-r--r--testing/web-platform/tests/referrer-policy/4K/gen/top.meta/no-referrer-when-downgrade/a-tag.http.html64
-rw-r--r--testing/web-platform/tests/referrer-policy/4K/gen/top.meta/no-referrer-when-downgrade/fetch.http.html144
-rw-r--r--testing/web-platform/tests/referrer-policy/4K/gen/top.meta/no-referrer-when-downgrade/iframe-tag.http.html144
-rw-r--r--testing/web-platform/tests/referrer-policy/4K/gen/top.meta/no-referrer-when-downgrade/img-tag.http.html144
-rw-r--r--testing/web-platform/tests/referrer-policy/4K/gen/top.meta/no-referrer-when-downgrade/script-tag.http.html144
-rw-r--r--testing/web-platform/tests/referrer-policy/4K/gen/top.meta/no-referrer-when-downgrade/sharedworker-classic.http.html44
-rw-r--r--testing/web-platform/tests/referrer-policy/4K/gen/top.meta/no-referrer-when-downgrade/worker-classic.http.html44
-rw-r--r--testing/web-platform/tests/referrer-policy/4K/gen/top.meta/no-referrer-when-downgrade/worker-module.http.html44
-rw-r--r--testing/web-platform/tests/referrer-policy/4K/gen/top.meta/no-referrer-when-downgrade/xhr.http.html144
-rw-r--r--testing/web-platform/tests/referrer-policy/4K/gen/top.meta/origin-when-cross-origin/a-tag.http.html34
-rw-r--r--testing/web-platform/tests/referrer-policy/4K/gen/top.meta/origin-when-cross-origin/fetch.http.html44
-rw-r--r--testing/web-platform/tests/referrer-policy/4K/gen/top.meta/origin-when-cross-origin/iframe-tag.http.html44
-rw-r--r--testing/web-platform/tests/referrer-policy/4K/gen/top.meta/origin-when-cross-origin/img-tag.http.html44
-rw-r--r--testing/web-platform/tests/referrer-policy/4K/gen/top.meta/origin-when-cross-origin/script-tag.http.html44
-rw-r--r--testing/web-platform/tests/referrer-policy/4K/gen/top.meta/origin-when-cross-origin/sharedworker-classic.http.html44
-rw-r--r--testing/web-platform/tests/referrer-policy/4K/gen/top.meta/origin-when-cross-origin/worker-classic.http.html44
-rw-r--r--testing/web-platform/tests/referrer-policy/4K/gen/top.meta/origin-when-cross-origin/worker-module.http.html44
-rw-r--r--testing/web-platform/tests/referrer-policy/4K/gen/top.meta/origin-when-cross-origin/xhr.http.html44
-rw-r--r--testing/web-platform/tests/referrer-policy/4K/gen/top.meta/same-origin/a-tag.http.html34
-rw-r--r--testing/web-platform/tests/referrer-policy/4K/gen/top.meta/same-origin/fetch.http.html44
-rw-r--r--testing/web-platform/tests/referrer-policy/4K/gen/top.meta/same-origin/iframe-tag.http.html44
-rw-r--r--testing/web-platform/tests/referrer-policy/4K/gen/top.meta/same-origin/img-tag.http.html44
-rw-r--r--testing/web-platform/tests/referrer-policy/4K/gen/top.meta/same-origin/script-tag.http.html44
-rw-r--r--testing/web-platform/tests/referrer-policy/4K/gen/top.meta/same-origin/sharedworker-classic.http.html44
-rw-r--r--testing/web-platform/tests/referrer-policy/4K/gen/top.meta/same-origin/worker-classic.http.html44
-rw-r--r--testing/web-platform/tests/referrer-policy/4K/gen/top.meta/same-origin/worker-module.http.html44
-rw-r--r--testing/web-platform/tests/referrer-policy/4K/gen/top.meta/same-origin/xhr.http.html44
-rw-r--r--testing/web-platform/tests/referrer-policy/4K/gen/top.meta/strict-origin-when-cross-origin/a-tag.http.html34
-rw-r--r--testing/web-platform/tests/referrer-policy/4K/gen/top.meta/strict-origin-when-cross-origin/fetch.http.html44
-rw-r--r--testing/web-platform/tests/referrer-policy/4K/gen/top.meta/strict-origin-when-cross-origin/iframe-tag.http.html44
-rw-r--r--testing/web-platform/tests/referrer-policy/4K/gen/top.meta/strict-origin-when-cross-origin/img-tag.http.html44
-rw-r--r--testing/web-platform/tests/referrer-policy/4K/gen/top.meta/strict-origin-when-cross-origin/script-tag.http.html44
-rw-r--r--testing/web-platform/tests/referrer-policy/4K/gen/top.meta/strict-origin-when-cross-origin/sharedworker-classic.http.html44
-rw-r--r--testing/web-platform/tests/referrer-policy/4K/gen/top.meta/strict-origin-when-cross-origin/worker-classic.http.html44
-rw-r--r--testing/web-platform/tests/referrer-policy/4K/gen/top.meta/strict-origin-when-cross-origin/worker-module.http.html44
-rw-r--r--testing/web-platform/tests/referrer-policy/4K/gen/top.meta/strict-origin-when-cross-origin/xhr.http.html44
-rw-r--r--testing/web-platform/tests/referrer-policy/4K/gen/top.meta/unsafe-url/a-tag.http.html64
-rw-r--r--testing/web-platform/tests/referrer-policy/4K/gen/top.meta/unsafe-url/fetch.http.html144
-rw-r--r--testing/web-platform/tests/referrer-policy/4K/gen/top.meta/unsafe-url/iframe-tag.http.html144
-rw-r--r--testing/web-platform/tests/referrer-policy/4K/gen/top.meta/unsafe-url/img-tag.http.html144
-rw-r--r--testing/web-platform/tests/referrer-policy/4K/gen/top.meta/unsafe-url/script-tag.http.html144
-rw-r--r--testing/web-platform/tests/referrer-policy/4K/gen/top.meta/unsafe-url/sharedworker-classic.http.html44
-rw-r--r--testing/web-platform/tests/referrer-policy/4K/gen/top.meta/unsafe-url/worker-classic.http.html44
-rw-r--r--testing/web-platform/tests/referrer-policy/4K/gen/top.meta/unsafe-url/worker-module.http.html44
-rw-r--r--testing/web-platform/tests/referrer-policy/4K/gen/top.meta/unsafe-url/xhr.http.html144
-rw-r--r--testing/web-platform/tests/referrer-policy/4K/gen/top.meta/unset/a-tag.http.html33
-rw-r--r--testing/web-platform/tests/referrer-policy/4K/gen/top.meta/unset/fetch.http.html43
-rw-r--r--testing/web-platform/tests/referrer-policy/4K/gen/top.meta/unset/iframe-tag.http.html43
-rw-r--r--testing/web-platform/tests/referrer-policy/4K/gen/top.meta/unset/img-tag.http.html43
-rw-r--r--testing/web-platform/tests/referrer-policy/4K/gen/top.meta/unset/script-tag.http.html43
-rw-r--r--testing/web-platform/tests/referrer-policy/4K/gen/top.meta/unset/sharedworker-classic.http.html43
-rw-r--r--testing/web-platform/tests/referrer-policy/4K/gen/top.meta/unset/worker-classic.http.html43
-rw-r--r--testing/web-platform/tests/referrer-policy/4K/gen/top.meta/unset/worker-module.http.html43
-rw-r--r--testing/web-platform/tests/referrer-policy/4K/gen/top.meta/unset/xhr.http.html43
-rw-r--r--testing/web-platform/tests/referrer-policy/4K/generic/test-case.sub.js20
-rw-r--r--testing/web-platform/tests/referrer-policy/4K/spec.src.json52
-rw-r--r--testing/web-platform/tests/referrer-policy/META.yml3
-rw-r--r--testing/web-platform/tests/referrer-policy/README.md6
-rw-r--r--testing/web-platform/tests/referrer-policy/css-integration/README.md14
-rw-r--r--testing/web-platform/tests/referrer-policy/css-integration/child-css/external-import-stylesheet.html46
-rw-r--r--testing/web-platform/tests/referrer-policy/css-integration/child-css/internal-import-stylesheet-with-differentorigin-base-url-from-preload.tentative.html47
-rw-r--r--testing/web-platform/tests/referrer-policy/css-integration/child-css/internal-import-stylesheet-with-differentorigin-base-url.tentative.html47
-rw-r--r--testing/web-platform/tests/referrer-policy/css-integration/child-css/internal-import-stylesheet.html42
-rw-r--r--testing/web-platform/tests/referrer-policy/css-integration/child-css/processing-instruction.html44
-rw-r--r--testing/web-platform/tests/referrer-policy/css-integration/css-test-helper.js55
-rw-r--r--testing/web-platform/tests/referrer-policy/css-integration/font-face/external-import-stylesheet.html51
-rw-r--r--testing/web-platform/tests/referrer-policy/css-integration/font-face/external-stylesheet.html45
-rw-r--r--testing/web-platform/tests/referrer-policy/css-integration/font-face/internal-import-stylesheet.html42
-rw-r--r--testing/web-platform/tests/referrer-policy/css-integration/font-face/internal-stylesheet.html42
-rw-r--r--testing/web-platform/tests/referrer-policy/css-integration/font-face/processing-instruction.html48
-rw-r--r--testing/web-platform/tests/referrer-policy/css-integration/image/external-import-stylesheet.html51
-rw-r--r--testing/web-platform/tests/referrer-policy/css-integration/image/external-stylesheet.html45
-rw-r--r--testing/web-platform/tests/referrer-policy/css-integration/image/inline-style-with-differentorigin-base-tag.tentative.html45
-rw-r--r--testing/web-platform/tests/referrer-policy/css-integration/image/inline-style.html38
-rw-r--r--testing/web-platform/tests/referrer-policy/css-integration/image/internal-import-stylesheet.html42
-rw-r--r--testing/web-platform/tests/referrer-policy/css-integration/image/internal-stylesheet.html40
-rw-r--r--testing/web-platform/tests/referrer-policy/css-integration/image/presentation-attribute.html35
-rw-r--r--testing/web-platform/tests/referrer-policy/css-integration/image/processing-instruction.html41
-rw-r--r--testing/web-platform/tests/referrer-policy/css-integration/svg/external-stylesheet.html41
-rw-r--r--testing/web-platform/tests/referrer-policy/css-integration/svg/inline-style-with-differentorigin-base-tag.tentative.html40
-rw-r--r--testing/web-platform/tests/referrer-policy/css-integration/svg/inline-style.html35
-rw-r--r--testing/web-platform/tests/referrer-policy/css-integration/svg/internal-stylesheet.html35
-rw-r--r--testing/web-platform/tests/referrer-policy/css-integration/svg/presentation-attribute.html40
-rw-r--r--testing/web-platform/tests/referrer-policy/css-integration/svg/processing-instruction.html38
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/no-referrer-when-downgrade/a-tag.http.html107
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/no-referrer-when-downgrade/fetch.http.html275
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/no-referrer-when-downgrade/iframe-tag.http.html275
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/no-referrer-when-downgrade/img-tag.http.html275
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/no-referrer-when-downgrade/script-tag.http.html275
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/no-referrer-when-downgrade/sharedworker-classic.http.html65
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/no-referrer-when-downgrade/sharedworker-module.http.html65
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/no-referrer-when-downgrade/worker-classic.http.html65
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/no-referrer-when-downgrade/worker-module.http.html65
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/no-referrer-when-downgrade/xhr.http.html275
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/no-referrer/a-tag.http.html107
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/no-referrer/fetch.http.html275
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/no-referrer/iframe-tag.http.html275
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/no-referrer/img-tag.http.html275
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/no-referrer/script-tag.http.html275
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/no-referrer/sharedworker-classic.http.html65
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/no-referrer/sharedworker-module.http.html65
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/no-referrer/worker-classic.http.html65
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/no-referrer/worker-module.http.html65
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/no-referrer/xhr.http.html275
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/origin-when-cross-origin/a-tag.http.html107
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/origin-when-cross-origin/fetch.http.html275
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/origin-when-cross-origin/iframe-tag.http.html275
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/origin-when-cross-origin/img-tag.http.html275
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/origin-when-cross-origin/script-tag.http.html275
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/origin-when-cross-origin/sharedworker-classic.http.html65
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/origin-when-cross-origin/sharedworker-module.http.html65
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/origin-when-cross-origin/worker-classic.http.html65
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/origin-when-cross-origin/worker-module.http.html65
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/origin-when-cross-origin/xhr.http.html275
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/origin/a-tag.http.html107
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/origin/fetch.http.html275
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/origin/iframe-tag.http.html275
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/origin/img-tag.http.html275
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/origin/script-tag.http.html275
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/origin/sharedworker-classic.http.html65
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/origin/sharedworker-module.http.html65
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/origin/worker-classic.http.html65
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/origin/worker-module.http.html65
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/origin/xhr.http.html275
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/same-origin/a-tag.http.html86
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/same-origin/fetch.http.html233
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/same-origin/iframe-tag.http.html233
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/same-origin/img-tag.http.html233
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/same-origin/script-tag.http.html233
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/same-origin/sharedworker-classic.http.html65
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/same-origin/sharedworker-module.http.html65
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/same-origin/worker-classic.http.html65
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/same-origin/worker-module.http.html65
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/same-origin/xhr.http.html233
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/strict-origin-when-cross-origin/a-tag.http.html107
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/strict-origin-when-cross-origin/fetch.http.html275
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/strict-origin-when-cross-origin/iframe-tag.http.html275
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/strict-origin-when-cross-origin/img-tag.http.html275
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/strict-origin-when-cross-origin/script-tag.http.html275
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/strict-origin-when-cross-origin/sharedworker-classic.http.html65
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/strict-origin-when-cross-origin/sharedworker-module.http.html65
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/strict-origin-when-cross-origin/worker-classic.http.html65
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/strict-origin-when-cross-origin/worker-module.http.html65
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/strict-origin-when-cross-origin/xhr.http.html275
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/strict-origin/a-tag.http.html107
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/strict-origin/fetch.http.html275
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/strict-origin/iframe-tag.http.html275
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/strict-origin/img-tag.http.html275
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/strict-origin/script-tag.http.html275
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/strict-origin/sharedworker-classic.http.html65
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/strict-origin/sharedworker-module.http.html65
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/strict-origin/worker-classic.http.html65
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/strict-origin/worker-module.http.html65
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/strict-origin/xhr.http.html275
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/unsafe-url/a-tag.http.html107
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/unsafe-url/fetch.http.html275
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/unsafe-url/iframe-tag.http.html275
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/unsafe-url/img-tag.http.html275
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/unsafe-url/script-tag.http.html275
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/unsafe-url/sharedworker-classic.http.html65
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/unsafe-url/sharedworker-module.http.html65
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/unsafe-url/worker-classic.http.html65
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/unsafe-url/worker-module.http.html65
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/unsafe-url/xhr.http.html275
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/unset/a-tag.http.html83
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/unset/fetch.http.html203
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/unset/iframe-tag.http.html203
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/unset/img-tag.http.html203
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/unset/script-tag.http.html203
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/unset/sharedworker-classic.http.html53
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/unset/sharedworker-module.http.html53
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/unset/worker-classic.http.html53
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/unset/worker-module.http.html53
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/unset/xhr.http.html203
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/iframe.meta/always/a-tag.http.html107
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/iframe.meta/always/fetch.http.html275
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/iframe.meta/always/iframe-tag.http.html275
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/iframe.meta/always/img-tag.http.html275
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/iframe.meta/always/script-tag.http.html275
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/iframe.meta/always/sharedworker-classic.http.html65
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/iframe.meta/always/sharedworker-module.http.html65
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/iframe.meta/always/worker-classic.http.html65
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/iframe.meta/always/worker-module.http.html65
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/iframe.meta/always/xhr.http.html275
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/iframe.meta/default/a-tag.http.html107
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/iframe.meta/default/fetch.http.html275
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/iframe.meta/default/iframe-tag.http.html275
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/iframe.meta/default/img-tag.http.html275
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/iframe.meta/default/script-tag.http.html275
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/iframe.meta/default/sharedworker-classic.http.html65
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/iframe.meta/default/sharedworker-module.http.html65
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/iframe.meta/default/worker-classic.http.html65
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/iframe.meta/default/worker-module.http.html65
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/iframe.meta/default/xhr.http.html275
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/iframe.meta/never/a-tag.http.html107
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/iframe.meta/never/fetch.http.html275
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/iframe.meta/never/iframe-tag.http.html275
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/iframe.meta/never/img-tag.http.html275
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/iframe.meta/never/script-tag.http.html275
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/iframe.meta/never/sharedworker-classic.http.html65
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/iframe.meta/never/sharedworker-module.http.html65
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/iframe.meta/never/worker-classic.http.html65
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/iframe.meta/never/worker-module.http.html65
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/iframe.meta/never/xhr.http.html275
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/iframe.meta/no-referrer-when-downgrade/a-tag.http.html107
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/iframe.meta/no-referrer-when-downgrade/fetch.http.html275
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/iframe.meta/no-referrer-when-downgrade/iframe-tag.http.html275
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/iframe.meta/no-referrer-when-downgrade/img-tag.http.html275
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/iframe.meta/no-referrer-when-downgrade/script-tag.http.html275
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/iframe.meta/no-referrer-when-downgrade/sharedworker-classic.http.html65
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/iframe.meta/no-referrer-when-downgrade/sharedworker-module.http.html65
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/iframe.meta/no-referrer-when-downgrade/worker-classic.http.html65
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/iframe.meta/no-referrer-when-downgrade/worker-module.http.html65
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/iframe.meta/no-referrer-when-downgrade/xhr.http.html275
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/iframe.meta/no-referrer/a-tag.http.html107
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/iframe.meta/no-referrer/fetch.http.html275
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/iframe.meta/no-referrer/iframe-tag.http.html275
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/iframe.meta/no-referrer/img-tag.http.html275
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/iframe.meta/no-referrer/script-tag.http.html275
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/iframe.meta/no-referrer/sharedworker-classic.http.html65
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/iframe.meta/no-referrer/sharedworker-module.http.html65
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/iframe.meta/no-referrer/worker-classic.http.html65
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/iframe.meta/no-referrer/worker-module.http.html65
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/iframe.meta/no-referrer/xhr.http.html275
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/iframe.meta/origin-when-cross-origin/a-tag.http.html107
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/iframe.meta/origin-when-cross-origin/fetch.http.html275
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/iframe.meta/origin-when-cross-origin/iframe-tag.http.html275
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/iframe.meta/origin-when-cross-origin/img-tag.http.html275
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/iframe.meta/origin-when-cross-origin/script-tag.http.html275
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/iframe.meta/origin-when-cross-origin/sharedworker-classic.http.html65
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/iframe.meta/origin-when-cross-origin/sharedworker-module.http.html65
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/iframe.meta/origin-when-cross-origin/worker-classic.http.html65
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/iframe.meta/origin-when-cross-origin/worker-module.http.html65
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/iframe.meta/origin-when-cross-origin/xhr.http.html275
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/iframe.meta/origin-when-crossorigin/a-tag.http.html107
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/iframe.meta/origin-when-crossorigin/fetch.http.html275
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/iframe.meta/origin-when-crossorigin/iframe-tag.http.html275
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/iframe.meta/origin-when-crossorigin/img-tag.http.html275
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/iframe.meta/origin-when-crossorigin/script-tag.http.html275
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/iframe.meta/origin-when-crossorigin/sharedworker-classic.http.html65
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/iframe.meta/origin-when-crossorigin/sharedworker-module.http.html65
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/iframe.meta/origin-when-crossorigin/worker-classic.http.html65
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/iframe.meta/origin-when-crossorigin/worker-module.http.html65
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/iframe.meta/origin-when-crossorigin/xhr.http.html275
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/iframe.meta/origin/a-tag.http.html107
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/iframe.meta/origin/fetch.http.html275
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/iframe.meta/origin/iframe-tag.http.html275
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/iframe.meta/origin/img-tag.http.html275
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/iframe.meta/origin/script-tag.http.html275
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/iframe.meta/origin/sharedworker-classic.http.html65
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/iframe.meta/origin/sharedworker-module.http.html65
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/iframe.meta/origin/worker-classic.http.html65
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/iframe.meta/origin/worker-module.http.html65
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/iframe.meta/origin/xhr.http.html275
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/iframe.meta/same-origin/a-tag.http.html86
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/iframe.meta/same-origin/fetch.http.html233
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/iframe.meta/same-origin/iframe-tag.http.html233
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/iframe.meta/same-origin/img-tag.http.html233
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/iframe.meta/same-origin/script-tag.http.html233
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/iframe.meta/same-origin/sharedworker-classic.http.html65
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/iframe.meta/same-origin/sharedworker-module.http.html65
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/iframe.meta/same-origin/worker-classic.http.html65
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/iframe.meta/same-origin/worker-module.http.html65
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/iframe.meta/same-origin/xhr.http.html233
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/iframe.meta/strict-origin-when-cross-origin/a-tag.http.html107
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/iframe.meta/strict-origin-when-cross-origin/fetch.http.html275
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/iframe.meta/strict-origin-when-cross-origin/iframe-tag.http.html275
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/iframe.meta/strict-origin-when-cross-origin/img-tag.http.html275
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/iframe.meta/strict-origin-when-cross-origin/script-tag.http.html275
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/iframe.meta/strict-origin-when-cross-origin/sharedworker-classic.http.html65
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/iframe.meta/strict-origin-when-cross-origin/sharedworker-module.http.html65
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/iframe.meta/strict-origin-when-cross-origin/worker-classic.http.html65
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/iframe.meta/strict-origin-when-cross-origin/worker-module.http.html65
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/iframe.meta/strict-origin-when-cross-origin/xhr.http.html275
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/iframe.meta/strict-origin/a-tag.http.html107
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/iframe.meta/strict-origin/fetch.http.html275
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/iframe.meta/strict-origin/iframe-tag.http.html275
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/iframe.meta/strict-origin/img-tag.http.html275
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/iframe.meta/strict-origin/script-tag.http.html275
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/iframe.meta/strict-origin/sharedworker-classic.http.html65
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/iframe.meta/strict-origin/sharedworker-module.http.html65
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/iframe.meta/strict-origin/worker-classic.http.html65
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/iframe.meta/strict-origin/worker-module.http.html65
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/iframe.meta/strict-origin/xhr.http.html275
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/iframe.meta/unsafe-url/a-tag.http.html107
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/iframe.meta/unsafe-url/fetch.http.html275
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/iframe.meta/unsafe-url/iframe-tag.http.html275
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/iframe.meta/unsafe-url/img-tag.http.html275
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/iframe.meta/unsafe-url/script-tag.http.html275
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/iframe.meta/unsafe-url/sharedworker-classic.http.html65
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/iframe.meta/unsafe-url/sharedworker-module.http.html65
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/iframe.meta/unsafe-url/worker-classic.http.html65
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/iframe.meta/unsafe-url/worker-module.http.html65
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/iframe.meta/unsafe-url/xhr.http.html275
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/iframe.meta/unset/a-tag.http.html83
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/iframe.meta/unset/fetch.http.html203
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/iframe.meta/unset/iframe-tag.http.html203
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/iframe.meta/unset/img-tag.http.html203
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/iframe.meta/unset/script-tag.http.html203
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/iframe.meta/unset/sharedworker-classic.http.html53
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/iframe.meta/unset/sharedworker-module.http.html53
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/iframe.meta/unset/worker-classic.http.html53
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/iframe.meta/unset/worker-module.http.html53
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/iframe.meta/unset/xhr.http.html203
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/req.attr/no-referrer-when-downgrade/a-tag.http.html87
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/req.attr/no-referrer-when-downgrade/iframe-tag.http.html215
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/req.attr/no-referrer-when-downgrade/img-tag.http.html215
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/req.attr/no-referrer-when-downgrade/script-tag-dynamic-import.http.html215
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/req.attr/no-referrer-when-downgrade/script-tag.http.html215
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/req.attr/no-referrer/a-tag.http.html87
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/req.attr/no-referrer/iframe-tag.http.html215
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/req.attr/no-referrer/img-tag.http.html215
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/req.attr/no-referrer/script-tag-dynamic-import.http.html215
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/req.attr/no-referrer/script-tag.http.html215
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/req.attr/origin-when-cross-origin/a-tag.http.html87
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/req.attr/origin-when-cross-origin/iframe-tag.http.html215
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/req.attr/origin-when-cross-origin/img-tag.http.html215
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/req.attr/origin-when-cross-origin/script-tag-dynamic-import.http.html215
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/req.attr/origin-when-cross-origin/script-tag.http.html215
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/req.attr/origin/a-tag.http.html87
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/req.attr/origin/iframe-tag.http.html215
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/req.attr/origin/img-tag.http.html215
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/req.attr/origin/script-tag-dynamic-import.http.html215
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/req.attr/origin/script-tag.http.html215
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/req.attr/same-origin/a-tag.http.html71
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/req.attr/same-origin/iframe-tag.http.html183
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/req.attr/same-origin/img-tag.http.html183
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/req.attr/same-origin/script-tag-dynamic-import.http.html183
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/req.attr/same-origin/script-tag.http.html183
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/req.attr/strict-origin-when-cross-origin/a-tag.http.html87
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/req.attr/strict-origin-when-cross-origin/iframe-tag.http.html215
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/req.attr/strict-origin-when-cross-origin/img-tag.http.html215
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/req.attr/strict-origin-when-cross-origin/script-tag-dynamic-import.http.html215
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/req.attr/strict-origin-when-cross-origin/script-tag.http.html215
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/req.attr/strict-origin/a-tag.http.html87
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/req.attr/strict-origin/iframe-tag.http.html215
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/req.attr/strict-origin/img-tag.http.html215
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/req.attr/strict-origin/script-tag-dynamic-import.http.html215
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/req.attr/strict-origin/script-tag.http.html215
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/req.attr/unsafe-url/a-tag.http.html87
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/req.attr/unsafe-url/iframe-tag.http.html215
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/req.attr/unsafe-url/img-tag.http.html215
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/req.attr/unsafe-url/script-tag-dynamic-import.http.html215
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/req.attr/unsafe-url/script-tag.http.html215
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/req.rel-noref/no-referrer/a-tag.http.html87
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/no-referrer-when-downgrade/a-tag.http.html82
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/no-referrer-when-downgrade/a-tag.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/no-referrer-when-downgrade/fetch.http.html202
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/no-referrer-when-downgrade/fetch.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/no-referrer-when-downgrade/iframe-tag.http.html202
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/no-referrer-when-downgrade/iframe-tag.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/no-referrer-when-downgrade/img-tag.http.html202
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/no-referrer-when-downgrade/img-tag.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/no-referrer-when-downgrade/script-tag.http.html202
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/no-referrer-when-downgrade/script-tag.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/no-referrer-when-downgrade/sharedworker-classic.http.html52
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/no-referrer-when-downgrade/sharedworker-classic.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/no-referrer-when-downgrade/sharedworker-module.http.html52
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/no-referrer-when-downgrade/sharedworker-module.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/no-referrer-when-downgrade/worker-classic.http.html52
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/no-referrer-when-downgrade/worker-classic.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/no-referrer-when-downgrade/worker-module.http.html52
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/no-referrer-when-downgrade/worker-module.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/no-referrer-when-downgrade/xhr.http.html202
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/no-referrer-when-downgrade/xhr.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/no-referrer/a-tag.http.html82
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/no-referrer/a-tag.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/no-referrer/fetch.http.html202
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/no-referrer/fetch.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/no-referrer/iframe-tag.http.html202
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/no-referrer/iframe-tag.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/no-referrer/img-tag.http.html202
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/no-referrer/img-tag.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/no-referrer/script-tag.http.html202
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/no-referrer/script-tag.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/no-referrer/sharedworker-classic.http.html52
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/no-referrer/sharedworker-classic.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/no-referrer/sharedworker-module.http.html52
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/no-referrer/sharedworker-module.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/no-referrer/worker-classic.http.html52
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/no-referrer/worker-classic.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/no-referrer/worker-module.http.html52
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/no-referrer/worker-module.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/no-referrer/xhr.http.html202
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/no-referrer/xhr.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/origin-when-cross-origin/a-tag.http.html82
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/origin-when-cross-origin/a-tag.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/origin-when-cross-origin/fetch.http.html202
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/origin-when-cross-origin/fetch.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/origin-when-cross-origin/iframe-tag.http.html202
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/origin-when-cross-origin/iframe-tag.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/origin-when-cross-origin/img-tag.http.html202
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/origin-when-cross-origin/img-tag.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/origin-when-cross-origin/script-tag.http.html202
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/origin-when-cross-origin/script-tag.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/origin-when-cross-origin/sharedworker-classic.http.html52
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/origin-when-cross-origin/sharedworker-classic.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/origin-when-cross-origin/sharedworker-module.http.html52
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/origin-when-cross-origin/sharedworker-module.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/origin-when-cross-origin/worker-classic.http.html52
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/origin-when-cross-origin/worker-classic.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/origin-when-cross-origin/worker-module.http.html52
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/origin-when-cross-origin/worker-module.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/origin-when-cross-origin/xhr.http.html202
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/origin-when-cross-origin/xhr.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/origin/a-tag.http.html82
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/origin/a-tag.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/origin/fetch.http.html202
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/origin/fetch.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/origin/iframe-tag.http.html202
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/origin/iframe-tag.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/origin/img-tag.http.html202
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/origin/img-tag.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/origin/script-tag.http.html202
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/origin/script-tag.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/origin/sharedworker-classic.http.html52
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/origin/sharedworker-classic.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/origin/sharedworker-module.http.html52
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/origin/sharedworker-module.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/origin/worker-classic.http.html52
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/origin/worker-classic.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/origin/worker-module.http.html52
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/origin/worker-module.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/origin/xhr.http.html202
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/origin/xhr.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/same-origin/a-tag.http.html67
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/same-origin/a-tag.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/same-origin/fetch.http.html172
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/same-origin/fetch.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/same-origin/iframe-tag.http.html172
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/same-origin/iframe-tag.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/same-origin/img-tag.http.html172
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/same-origin/img-tag.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/same-origin/script-tag.http.html172
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/same-origin/script-tag.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/same-origin/sharedworker-classic.http.html52
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/same-origin/sharedworker-classic.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/same-origin/sharedworker-module.http.html52
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/same-origin/sharedworker-module.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/same-origin/worker-classic.http.html52
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/same-origin/worker-classic.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/same-origin/worker-module.http.html52
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/same-origin/worker-module.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/same-origin/xhr.http.html172
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/same-origin/xhr.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/strict-origin-when-cross-origin/a-tag.http.html82
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/strict-origin-when-cross-origin/a-tag.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/strict-origin-when-cross-origin/fetch.http.html202
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/strict-origin-when-cross-origin/fetch.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/strict-origin-when-cross-origin/iframe-tag.http.html202
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/strict-origin-when-cross-origin/iframe-tag.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/strict-origin-when-cross-origin/img-tag.http.html202
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/strict-origin-when-cross-origin/img-tag.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/strict-origin-when-cross-origin/script-tag.http.html202
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/strict-origin-when-cross-origin/script-tag.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/strict-origin-when-cross-origin/sharedworker-classic.http.html52
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/strict-origin-when-cross-origin/sharedworker-classic.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/strict-origin-when-cross-origin/sharedworker-module.http.html52
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/strict-origin-when-cross-origin/sharedworker-module.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/strict-origin-when-cross-origin/worker-classic.http.html52
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/strict-origin-when-cross-origin/worker-classic.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/strict-origin-when-cross-origin/worker-module.http.html52
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/strict-origin-when-cross-origin/worker-module.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/strict-origin-when-cross-origin/xhr.http.html202
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/strict-origin-when-cross-origin/xhr.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/strict-origin/a-tag.http.html82
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/strict-origin/a-tag.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/strict-origin/fetch.http.html202
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/strict-origin/fetch.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/strict-origin/iframe-tag.http.html202
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/strict-origin/iframe-tag.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/strict-origin/img-tag.http.html202
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/strict-origin/img-tag.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/strict-origin/script-tag.http.html202
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/strict-origin/script-tag.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/strict-origin/sharedworker-classic.http.html52
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/strict-origin/sharedworker-classic.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/strict-origin/sharedworker-module.http.html52
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/strict-origin/sharedworker-module.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/strict-origin/worker-classic.http.html52
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/strict-origin/worker-classic.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/strict-origin/worker-module.http.html52
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/strict-origin/worker-module.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/strict-origin/xhr.http.html202
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/strict-origin/xhr.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/unsafe-url/a-tag.http.html82
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/unsafe-url/a-tag.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/unsafe-url/fetch.http.html202
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/unsafe-url/fetch.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/unsafe-url/iframe-tag.http.html202
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/unsafe-url/iframe-tag.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/unsafe-url/img-tag.http.html202
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/unsafe-url/img-tag.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/unsafe-url/script-tag.http.html202
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/unsafe-url/script-tag.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/unsafe-url/sharedworker-classic.http.html52
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/unsafe-url/sharedworker-classic.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/unsafe-url/sharedworker-module.http.html52
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/unsafe-url/sharedworker-module.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/unsafe-url/worker-classic.http.html52
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/unsafe-url/worker-classic.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/unsafe-url/worker-module.http.html52
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/unsafe-url/worker-module.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/unsafe-url/xhr.http.html202
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/unsafe-url/xhr.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/unset/a-tag.http.html82
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/unset/fetch.http.html202
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/unset/iframe-tag.http.html202
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/unset/img-tag.http.html202
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/unset/script-tag.http.html202
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/unset/sharedworker-classic.http.html52
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/unset/sharedworker-module.http.html52
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/unset/worker-classic.http.html52
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/unset/worker-module.http.html52
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/unset/xhr.http.html202
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/always/a-tag.http.html83
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/always/fetch.http.html203
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/always/iframe-tag.http.html203
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/always/img-tag.http.html203
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/always/script-tag.http.html203
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/always/sharedworker-classic.http.html53
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/always/sharedworker-module.http.html53
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/always/worker-classic.http.html53
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/always/worker-module.http.html53
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/always/xhr.http.html203
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/default/a-tag.http.html83
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/default/fetch.http.html203
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/default/iframe-tag.http.html203
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/default/img-tag.http.html203
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/default/script-tag.http.html203
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/default/sharedworker-classic.http.html53
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/default/sharedworker-module.http.html53
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/default/worker-classic.http.html53
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/default/worker-module.http.html53
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/default/xhr.http.html203
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/never/a-tag.http.html83
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/never/fetch.http.html203
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/never/iframe-tag.http.html203
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/never/img-tag.http.html203
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/never/script-tag.http.html203
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/never/sharedworker-classic.http.html53
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/never/sharedworker-module.http.html53
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/never/worker-classic.http.html53
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/never/worker-module.http.html53
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/never/xhr.http.html203
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/no-referrer-when-downgrade/a-tag.http.html83
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/no-referrer-when-downgrade/fetch.http.html203
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/no-referrer-when-downgrade/iframe-tag.http.html203
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/no-referrer-when-downgrade/img-tag.http.html203
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/no-referrer-when-downgrade/script-tag.http.html203
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/no-referrer-when-downgrade/sharedworker-classic.http.html53
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/no-referrer-when-downgrade/sharedworker-module.http.html53
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/no-referrer-when-downgrade/worker-classic.http.html53
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/no-referrer-when-downgrade/worker-module.http.html53
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/no-referrer-when-downgrade/xhr.http.html203
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/no-referrer/a-tag.http.html83
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/no-referrer/fetch.http.html203
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/no-referrer/iframe-tag.http.html203
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/no-referrer/img-tag.http.html203
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/no-referrer/script-tag.http.html203
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/no-referrer/sharedworker-classic.http.html53
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/no-referrer/sharedworker-module.http.html53
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/no-referrer/worker-classic.http.html53
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/no-referrer/worker-module.http.html53
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/no-referrer/xhr.http.html203
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/origin-when-cross-origin/a-tag.http.html83
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/origin-when-cross-origin/fetch.http.html203
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/origin-when-cross-origin/iframe-tag.http.html203
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/origin-when-cross-origin/img-tag.http.html203
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/origin-when-cross-origin/script-tag.http.html203
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/origin-when-cross-origin/sharedworker-classic.http.html53
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/origin-when-cross-origin/sharedworker-module.http.html53
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/origin-when-cross-origin/worker-classic.http.html53
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/origin-when-cross-origin/worker-module.http.html53
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/origin-when-cross-origin/xhr.http.html203
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/origin-when-crossorigin/a-tag.http.html83
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/origin-when-crossorigin/fetch.http.html203
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/origin-when-crossorigin/iframe-tag.http.html203
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/origin-when-crossorigin/img-tag.http.html203
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/origin-when-crossorigin/script-tag.http.html203
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/origin-when-crossorigin/sharedworker-classic.http.html53
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/origin-when-crossorigin/sharedworker-module.http.html53
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/origin-when-crossorigin/worker-classic.http.html53
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/origin-when-crossorigin/worker-module.http.html53
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/origin-when-crossorigin/xhr.http.html203
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/origin/a-tag.http.html83
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/origin/fetch.http.html203
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/origin/iframe-tag.http.html203
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/origin/img-tag.http.html203
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/origin/script-tag.http.html203
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/origin/sharedworker-classic.http.html53
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/origin/sharedworker-module.http.html53
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/origin/worker-classic.http.html53
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/origin/worker-module.http.html53
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/origin/xhr.http.html203
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/same-origin/a-tag.http.html68
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/same-origin/fetch.http.html173
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/same-origin/iframe-tag.http.html173
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/same-origin/img-tag.http.html173
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/same-origin/script-tag.http.html173
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/same-origin/sharedworker-classic.http.html53
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/same-origin/sharedworker-module.http.html53
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/same-origin/worker-classic.http.html53
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/same-origin/worker-module.http.html53
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/same-origin/xhr.http.html173
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/strict-origin-when-cross-origin/a-tag.http.html83
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/strict-origin-when-cross-origin/fetch.http.html203
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/strict-origin-when-cross-origin/iframe-tag.http.html203
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/strict-origin-when-cross-origin/img-tag.http.html203
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/strict-origin-when-cross-origin/script-tag.http.html203
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/strict-origin-when-cross-origin/sharedworker-classic.http.html53
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/strict-origin-when-cross-origin/sharedworker-module.http.html53
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/strict-origin-when-cross-origin/worker-classic.http.html53
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/strict-origin-when-cross-origin/worker-module.http.html53
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/strict-origin-when-cross-origin/xhr.http.html203
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/strict-origin/a-tag.http.html83
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/strict-origin/fetch.http.html203
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/strict-origin/iframe-tag.http.html203
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/strict-origin/img-tag.http.html203
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/strict-origin/script-tag.http.html203
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/strict-origin/sharedworker-classic.http.html53
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/strict-origin/sharedworker-module.http.html53
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/strict-origin/worker-classic.http.html53
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/strict-origin/worker-module.http.html53
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/strict-origin/xhr.http.html203
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/unsafe-url/a-tag.http.html83
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/unsafe-url/fetch.http.html203
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/unsafe-url/iframe-tag.http.html203
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/unsafe-url/img-tag.http.html203
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/unsafe-url/script-tag.http.html203
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/unsafe-url/sharedworker-classic.http.html53
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/unsafe-url/sharedworker-module.http.html53
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/unsafe-url/worker-classic.http.html53
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/unsafe-url/worker-module.http.html53
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/unsafe-url/xhr.http.html203
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/unset/a-tag.http.html82
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/unset/fetch.http.html202
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/unset/iframe-tag.http.html202
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/unset/img-tag.http.html202
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/unset/script-tag.http.html202
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/unset/sharedworker-classic.http.html52
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/unset/sharedworker-module.http.html52
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/unset/worker-classic.http.html52
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/unset/worker-module.http.html52
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/unset/xhr.http.html202
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/always/a-tag.http.html107
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/always/fetch.http.html275
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/always/iframe-tag.http.html275
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/always/img-tag.http.html275
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/always/script-tag.http.html275
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/always/sharedworker-classic.http.html65
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/always/sharedworker-module.http.html65
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/always/worker-classic.http.html65
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/always/worker-module.http.html65
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/always/xhr.http.html275
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/default/a-tag.http.html107
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/default/fetch.http.html275
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/default/iframe-tag.http.html275
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/default/img-tag.http.html275
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/default/script-tag.http.html275
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/default/sharedworker-classic.http.html65
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/default/sharedworker-module.http.html65
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/default/worker-classic.http.html65
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/default/worker-module.http.html65
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/default/xhr.http.html275
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/never/a-tag.http.html107
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/never/fetch.http.html275
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/never/iframe-tag.http.html275
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/never/img-tag.http.html275
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/never/script-tag.http.html275
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/never/sharedworker-classic.http.html65
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/never/sharedworker-module.http.html65
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/never/worker-classic.http.html65
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/never/worker-module.http.html65
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/never/xhr.http.html275
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/no-referrer-when-downgrade/a-tag.http.html107
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/no-referrer-when-downgrade/fetch.http.html275
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/no-referrer-when-downgrade/iframe-tag.http.html275
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/no-referrer-when-downgrade/img-tag.http.html275
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/no-referrer-when-downgrade/script-tag.http.html275
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/no-referrer-when-downgrade/sharedworker-classic.http.html65
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/no-referrer-when-downgrade/sharedworker-module.http.html65
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/no-referrer-when-downgrade/worker-classic.http.html65
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/no-referrer-when-downgrade/worker-module.http.html65
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/no-referrer-when-downgrade/xhr.http.html275
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/no-referrer/a-tag.http.html107
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/no-referrer/fetch.http.html275
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/no-referrer/iframe-tag.http.html275
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/no-referrer/img-tag.http.html275
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/no-referrer/script-tag.http.html275
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/no-referrer/sharedworker-classic.http.html65
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/no-referrer/sharedworker-module.http.html65
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/no-referrer/worker-classic.http.html65
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/no-referrer/worker-module.http.html65
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/no-referrer/xhr.http.html275
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/origin-when-cross-origin/a-tag.http.html107
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/origin-when-cross-origin/fetch.http.html275
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/origin-when-cross-origin/iframe-tag.http.html275
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/origin-when-cross-origin/img-tag.http.html275
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/origin-when-cross-origin/script-tag.http.html275
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/origin-when-cross-origin/sharedworker-classic.http.html65
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/origin-when-cross-origin/sharedworker-module.http.html65
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/origin-when-cross-origin/worker-classic.http.html65
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/origin-when-cross-origin/worker-module.http.html65
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/origin-when-cross-origin/xhr.http.html275
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/origin-when-crossorigin/a-tag.http.html107
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/origin-when-crossorigin/fetch.http.html275
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/origin-when-crossorigin/iframe-tag.http.html275
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/origin-when-crossorigin/img-tag.http.html275
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/origin-when-crossorigin/script-tag.http.html275
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/origin-when-crossorigin/sharedworker-classic.http.html65
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/origin-when-crossorigin/sharedworker-module.http.html65
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/origin-when-crossorigin/worker-classic.http.html65
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/origin-when-crossorigin/worker-module.http.html65
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/origin-when-crossorigin/xhr.http.html275
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/origin/a-tag.http.html107
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/origin/fetch.http.html275
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/origin/iframe-tag.http.html275
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/origin/img-tag.http.html275
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/origin/script-tag.http.html275
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/origin/sharedworker-classic.http.html65
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/origin/sharedworker-module.http.html65
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/origin/worker-classic.http.html65
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/origin/worker-module.http.html65
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/origin/xhr.http.html275
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/same-origin/a-tag.http.html86
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/same-origin/fetch.http.html233
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/same-origin/iframe-tag.http.html233
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/same-origin/img-tag.http.html233
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/same-origin/script-tag.http.html233
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/same-origin/sharedworker-classic.http.html65
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/same-origin/sharedworker-module.http.html65
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/same-origin/worker-classic.http.html65
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/same-origin/worker-module.http.html65
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/same-origin/xhr.http.html233
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/strict-origin-when-cross-origin/a-tag.http.html107
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/strict-origin-when-cross-origin/fetch.http.html275
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/strict-origin-when-cross-origin/iframe-tag.http.html275
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/strict-origin-when-cross-origin/img-tag.http.html275
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/strict-origin-when-cross-origin/script-tag.http.html275
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/strict-origin-when-cross-origin/sharedworker-classic.http.html65
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/strict-origin-when-cross-origin/sharedworker-module.http.html65
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/strict-origin-when-cross-origin/worker-classic.http.html65
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/strict-origin-when-cross-origin/worker-module.http.html65
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/strict-origin-when-cross-origin/xhr.http.html275
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/strict-origin/a-tag.http.html107
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/strict-origin/fetch.http.html275
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/strict-origin/iframe-tag.http.html275
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/strict-origin/img-tag.http.html275
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/strict-origin/script-tag.http.html275
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/strict-origin/sharedworker-classic.http.html65
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/strict-origin/sharedworker-module.http.html65
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/strict-origin/worker-classic.http.html65
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/strict-origin/worker-module.http.html65
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/strict-origin/xhr.http.html275
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/unsafe-url/a-tag.http.html107
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/unsafe-url/fetch.http.html275
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/unsafe-url/iframe-tag.http.html275
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/unsafe-url/img-tag.http.html275
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/unsafe-url/script-tag.http.html275
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/unsafe-url/sharedworker-classic.http.html65
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/unsafe-url/sharedworker-module.http.html65
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/unsafe-url/worker-classic.http.html65
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/unsafe-url/worker-module.http.html65
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/unsafe-url/xhr.http.html275
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.http-rp/no-referrer-when-downgrade/a-tag.http.html62
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.http-rp/no-referrer-when-downgrade/a-tag.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.http-rp/no-referrer-when-downgrade/fetch.http.html142
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.http-rp/no-referrer-when-downgrade/fetch.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.http-rp/no-referrer-when-downgrade/iframe-tag.http.html142
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.http-rp/no-referrer-when-downgrade/iframe-tag.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.http-rp/no-referrer-when-downgrade/img-tag.http.html142
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.http-rp/no-referrer-when-downgrade/img-tag.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.http-rp/no-referrer-when-downgrade/script-tag-dynamic-import.http.html142
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.http-rp/no-referrer-when-downgrade/script-tag-dynamic-import.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.http-rp/no-referrer-when-downgrade/script-tag.http.html142
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.http-rp/no-referrer-when-downgrade/script-tag.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.http-rp/no-referrer-when-downgrade/sharedworker-classic.http.html42
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.http-rp/no-referrer-when-downgrade/sharedworker-classic.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.http-rp/no-referrer-when-downgrade/sharedworker-module.http.html42
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.http-rp/no-referrer-when-downgrade/sharedworker-module.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.http-rp/no-referrer-when-downgrade/worker-classic.http.html42
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.http-rp/no-referrer-when-downgrade/worker-classic.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.http-rp/no-referrer-when-downgrade/worker-module.http.html42
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.http-rp/no-referrer-when-downgrade/worker-module.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.http-rp/no-referrer-when-downgrade/xhr.http.html142
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.http-rp/no-referrer-when-downgrade/xhr.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.http-rp/no-referrer/a-tag.http.html62
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.http-rp/no-referrer/a-tag.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.http-rp/no-referrer/fetch.http.html142
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.http-rp/no-referrer/fetch.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.http-rp/no-referrer/iframe-tag.http.html142
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.http-rp/no-referrer/iframe-tag.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.http-rp/no-referrer/img-tag.http.html142
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.http-rp/no-referrer/img-tag.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.http-rp/no-referrer/script-tag-dynamic-import.http.html142
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.http-rp/no-referrer/script-tag-dynamic-import.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.http-rp/no-referrer/script-tag.http.html142
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.http-rp/no-referrer/script-tag.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.http-rp/no-referrer/sharedworker-classic.http.html42
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.http-rp/no-referrer/sharedworker-classic.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.http-rp/no-referrer/sharedworker-module.http.html42
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.http-rp/no-referrer/sharedworker-module.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.http-rp/no-referrer/worker-classic.http.html42
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.http-rp/no-referrer/worker-classic.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.http-rp/no-referrer/worker-module.http.html42
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.http-rp/no-referrer/worker-module.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.http-rp/no-referrer/xhr.http.html142
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.http-rp/no-referrer/xhr.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.http-rp/origin-when-cross-origin/a-tag.http.html62
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.http-rp/origin-when-cross-origin/a-tag.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.http-rp/origin-when-cross-origin/fetch.http.html142
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.http-rp/origin-when-cross-origin/fetch.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.http-rp/origin-when-cross-origin/iframe-tag.http.html142
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.http-rp/origin-when-cross-origin/iframe-tag.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.http-rp/origin-when-cross-origin/img-tag.http.html142
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.http-rp/origin-when-cross-origin/img-tag.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.http-rp/origin-when-cross-origin/script-tag-dynamic-import.http.html142
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.http-rp/origin-when-cross-origin/script-tag-dynamic-import.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.http-rp/origin-when-cross-origin/script-tag.http.html142
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.http-rp/origin-when-cross-origin/script-tag.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.http-rp/origin-when-cross-origin/sharedworker-classic.http.html42
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.http-rp/origin-when-cross-origin/sharedworker-classic.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.http-rp/origin-when-cross-origin/sharedworker-module.http.html42
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.http-rp/origin-when-cross-origin/sharedworker-module.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.http-rp/origin-when-cross-origin/worker-classic.http.html42
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.http-rp/origin-when-cross-origin/worker-classic.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.http-rp/origin-when-cross-origin/worker-module.http.html42
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.http-rp/origin-when-cross-origin/worker-module.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.http-rp/origin-when-cross-origin/xhr.http.html142
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.http-rp/origin-when-cross-origin/xhr.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.http-rp/origin/a-tag.http.html62
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.http-rp/origin/a-tag.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.http-rp/origin/fetch.http.html142
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.http-rp/origin/fetch.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.http-rp/origin/iframe-tag.http.html142
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.http-rp/origin/iframe-tag.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.http-rp/origin/img-tag.http.html142
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.http-rp/origin/img-tag.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.http-rp/origin/script-tag-dynamic-import.http.html142
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.http-rp/origin/script-tag-dynamic-import.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.http-rp/origin/script-tag.http.html142
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.http-rp/origin/script-tag.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.http-rp/origin/sharedworker-classic.http.html42
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.http-rp/origin/sharedworker-classic.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.http-rp/origin/sharedworker-module.http.html42
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.http-rp/origin/sharedworker-module.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.http-rp/origin/worker-classic.http.html42
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.http-rp/origin/worker-classic.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.http-rp/origin/worker-module.http.html42
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.http-rp/origin/worker-module.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.http-rp/origin/xhr.http.html142
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.http-rp/origin/xhr.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.http-rp/same-origin/a-tag.http.html52
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.http-rp/same-origin/a-tag.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.http-rp/same-origin/fetch.http.html122
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.http-rp/same-origin/fetch.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.http-rp/same-origin/iframe-tag.http.html122
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.http-rp/same-origin/iframe-tag.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.http-rp/same-origin/img-tag.http.html122
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.http-rp/same-origin/img-tag.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.http-rp/same-origin/script-tag-dynamic-import.http.html122
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.http-rp/same-origin/script-tag-dynamic-import.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.http-rp/same-origin/script-tag.http.html122
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.http-rp/same-origin/script-tag.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.http-rp/same-origin/sharedworker-classic.http.html42
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.http-rp/same-origin/sharedworker-classic.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.http-rp/same-origin/sharedworker-module.http.html42
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.http-rp/same-origin/sharedworker-module.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.http-rp/same-origin/worker-classic.http.html42
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.http-rp/same-origin/worker-classic.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.http-rp/same-origin/worker-module.http.html42
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.http-rp/same-origin/worker-module.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.http-rp/same-origin/xhr.http.html122
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.http-rp/same-origin/xhr.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.http-rp/strict-origin-when-cross-origin/a-tag.http.html62
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.http-rp/strict-origin-when-cross-origin/a-tag.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.http-rp/strict-origin-when-cross-origin/fetch.http.html142
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.http-rp/strict-origin-when-cross-origin/fetch.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.http-rp/strict-origin-when-cross-origin/iframe-tag.http.html142
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.http-rp/strict-origin-when-cross-origin/iframe-tag.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.http-rp/strict-origin-when-cross-origin/img-tag.http.html142
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.http-rp/strict-origin-when-cross-origin/img-tag.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.http-rp/strict-origin-when-cross-origin/script-tag-dynamic-import.http.html142
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.http-rp/strict-origin-when-cross-origin/script-tag-dynamic-import.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.http-rp/strict-origin-when-cross-origin/script-tag.http.html142
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.http-rp/strict-origin-when-cross-origin/script-tag.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.http-rp/strict-origin-when-cross-origin/sharedworker-classic.http.html42
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.http-rp/strict-origin-when-cross-origin/sharedworker-classic.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.http-rp/strict-origin-when-cross-origin/sharedworker-module.http.html42
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.http-rp/strict-origin-when-cross-origin/sharedworker-module.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.http-rp/strict-origin-when-cross-origin/worker-classic.http.html42
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.http-rp/strict-origin-when-cross-origin/worker-classic.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.http-rp/strict-origin-when-cross-origin/worker-module.http.html42
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.http-rp/strict-origin-when-cross-origin/worker-module.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.http-rp/strict-origin-when-cross-origin/xhr.http.html142
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.http-rp/strict-origin-when-cross-origin/xhr.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.http-rp/strict-origin/a-tag.http.html62
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.http-rp/strict-origin/a-tag.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.http-rp/strict-origin/fetch.http.html142
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.http-rp/strict-origin/fetch.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.http-rp/strict-origin/iframe-tag.http.html142
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.http-rp/strict-origin/iframe-tag.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.http-rp/strict-origin/img-tag.http.html142
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.http-rp/strict-origin/img-tag.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.http-rp/strict-origin/script-tag-dynamic-import.http.html142
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.http-rp/strict-origin/script-tag-dynamic-import.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.http-rp/strict-origin/script-tag.http.html142
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.http-rp/strict-origin/script-tag.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.http-rp/strict-origin/sharedworker-classic.http.html42
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.http-rp/strict-origin/sharedworker-classic.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.http-rp/strict-origin/sharedworker-module.http.html42
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.http-rp/strict-origin/sharedworker-module.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.http-rp/strict-origin/worker-classic.http.html42
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.http-rp/strict-origin/worker-classic.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.http-rp/strict-origin/worker-module.http.html42
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.http-rp/strict-origin/worker-module.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.http-rp/strict-origin/xhr.http.html142
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.http-rp/strict-origin/xhr.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.http-rp/unsafe-url/a-tag.http.html62
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.http-rp/unsafe-url/a-tag.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.http-rp/unsafe-url/fetch.http.html142
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.http-rp/unsafe-url/fetch.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.http-rp/unsafe-url/iframe-tag.http.html142
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.http-rp/unsafe-url/iframe-tag.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.http-rp/unsafe-url/img-tag.http.html142
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.http-rp/unsafe-url/img-tag.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.http-rp/unsafe-url/script-tag-dynamic-import.http.html142
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.http-rp/unsafe-url/script-tag-dynamic-import.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.http-rp/unsafe-url/script-tag.http.html142
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.http-rp/unsafe-url/script-tag.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.http-rp/unsafe-url/sharedworker-classic.http.html42
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.http-rp/unsafe-url/sharedworker-classic.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.http-rp/unsafe-url/sharedworker-module.http.html42
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.http-rp/unsafe-url/sharedworker-module.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.http-rp/unsafe-url/worker-classic.http.html42
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.http-rp/unsafe-url/worker-classic.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.http-rp/unsafe-url/worker-module.http.html42
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.http-rp/unsafe-url/worker-module.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.http-rp/unsafe-url/xhr.http.html142
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.http-rp/unsafe-url/xhr.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.http-rp/unset/a-tag.http.html62
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.http-rp/unset/fetch.http.html142
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.http-rp/unset/iframe-tag.http.html142
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.http-rp/unset/img-tag.http.html142
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.http-rp/unset/script-tag-dynamic-import.http.html142
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.http-rp/unset/script-tag.http.html142
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.http-rp/unset/sharedworker-classic.http.html42
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.http-rp/unset/sharedworker-module.http.html42
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.http-rp/unset/worker-classic.http.html42
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.http-rp/unset/worker-module.http.html42
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.http-rp/unset/xhr.http.html142
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.meta/always/a-tag.http.html63
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.meta/always/fetch.http.html143
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.meta/always/iframe-tag.http.html143
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.meta/always/img-tag.http.html143
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.meta/always/script-tag-dynamic-import.http.html143
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.meta/always/script-tag.http.html143
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.meta/always/sharedworker-classic.http.html43
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.meta/always/sharedworker-module.http.html43
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.meta/always/worker-classic.http.html43
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.meta/always/worker-module.http.html43
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.meta/always/xhr.http.html143
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.meta/default/a-tag.http.html63
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.meta/default/fetch.http.html143
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.meta/default/iframe-tag.http.html143
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.meta/default/img-tag.http.html143
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.meta/default/script-tag-dynamic-import.http.html143
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.meta/default/script-tag.http.html143
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.meta/default/sharedworker-classic.http.html43
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.meta/default/sharedworker-module.http.html43
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.meta/default/worker-classic.http.html43
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.meta/default/worker-module.http.html43
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.meta/default/xhr.http.html143
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.meta/never/a-tag.http.html63
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.meta/never/fetch.http.html143
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.meta/never/iframe-tag.http.html143
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.meta/never/img-tag.http.html143
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.meta/never/script-tag-dynamic-import.http.html143
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.meta/never/script-tag.http.html143
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.meta/never/sharedworker-classic.http.html43
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.meta/never/sharedworker-module.http.html43
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.meta/never/worker-classic.http.html43
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.meta/never/worker-module.http.html43
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.meta/never/xhr.http.html143
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.meta/no-referrer-when-downgrade/a-tag.http.html63
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.meta/no-referrer-when-downgrade/fetch.http.html143
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.meta/no-referrer-when-downgrade/iframe-tag.http.html143
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.meta/no-referrer-when-downgrade/img-tag.http.html143
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.meta/no-referrer-when-downgrade/script-tag-dynamic-import.http.html143
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.meta/no-referrer-when-downgrade/script-tag.http.html143
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.meta/no-referrer-when-downgrade/sharedworker-classic.http.html43
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.meta/no-referrer-when-downgrade/sharedworker-module.http.html43
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.meta/no-referrer-when-downgrade/worker-classic.http.html43
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.meta/no-referrer-when-downgrade/worker-module.http.html43
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.meta/no-referrer-when-downgrade/xhr.http.html143
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.meta/no-referrer/a-tag.http.html63
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.meta/no-referrer/fetch.http.html143
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.meta/no-referrer/iframe-tag.http.html143
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.meta/no-referrer/img-tag.http.html143
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.meta/no-referrer/script-tag-dynamic-import.http.html143
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.meta/no-referrer/script-tag.http.html143
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.meta/no-referrer/sharedworker-classic.http.html43
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.meta/no-referrer/sharedworker-module.http.html43
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.meta/no-referrer/worker-classic.http.html43
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.meta/no-referrer/worker-module.http.html43
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.meta/no-referrer/xhr.http.html143
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.meta/origin-when-cross-origin/a-tag.http.html63
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.meta/origin-when-cross-origin/fetch.http.html143
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.meta/origin-when-cross-origin/iframe-tag.http.html143
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.meta/origin-when-cross-origin/img-tag.http.html143
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.meta/origin-when-cross-origin/script-tag-dynamic-import.http.html143
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.meta/origin-when-cross-origin/script-tag.http.html143
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.meta/origin-when-cross-origin/sharedworker-classic.http.html43
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.meta/origin-when-cross-origin/sharedworker-module.http.html43
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.meta/origin-when-cross-origin/worker-classic.http.html43
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.meta/origin-when-cross-origin/worker-module.http.html43
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.meta/origin-when-cross-origin/xhr.http.html143
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.meta/origin-when-crossorigin/a-tag.http.html63
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.meta/origin-when-crossorigin/fetch.http.html143
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.meta/origin-when-crossorigin/iframe-tag.http.html143
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.meta/origin-when-crossorigin/img-tag.http.html143
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.meta/origin-when-crossorigin/script-tag-dynamic-import.http.html143
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.meta/origin-when-crossorigin/script-tag.http.html143
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.meta/origin-when-crossorigin/sharedworker-classic.http.html43
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.meta/origin-when-crossorigin/sharedworker-module.http.html43
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.meta/origin-when-crossorigin/worker-classic.http.html43
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.meta/origin-when-crossorigin/worker-module.http.html43
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.meta/origin-when-crossorigin/xhr.http.html143
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.meta/origin/a-tag.http.html63
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.meta/origin/fetch.http.html143
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.meta/origin/iframe-tag.http.html143
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.meta/origin/img-tag.http.html143
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.meta/origin/script-tag-dynamic-import.http.html143
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.meta/origin/script-tag.http.html143
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.meta/origin/sharedworker-classic.http.html43
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.meta/origin/sharedworker-module.http.html43
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.meta/origin/worker-classic.http.html43
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.meta/origin/worker-module.http.html43
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.meta/origin/xhr.http.html143
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.meta/same-origin/a-tag.http.html53
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.meta/same-origin/fetch.http.html123
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.meta/same-origin/iframe-tag.http.html123
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.meta/same-origin/img-tag.http.html123
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.meta/same-origin/script-tag-dynamic-import.http.html123
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.meta/same-origin/script-tag.http.html123
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.meta/same-origin/sharedworker-classic.http.html43
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.meta/same-origin/sharedworker-module.http.html43
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.meta/same-origin/worker-classic.http.html43
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.meta/same-origin/worker-module.http.html43
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.meta/same-origin/xhr.http.html123
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.meta/strict-origin-when-cross-origin/a-tag.http.html63
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.meta/strict-origin-when-cross-origin/fetch.http.html143
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.meta/strict-origin-when-cross-origin/iframe-tag.http.html143
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.meta/strict-origin-when-cross-origin/img-tag.http.html143
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.meta/strict-origin-when-cross-origin/script-tag-dynamic-import.http.html143
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.meta/strict-origin-when-cross-origin/script-tag.http.html143
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.meta/strict-origin-when-cross-origin/sharedworker-classic.http.html43
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.meta/strict-origin-when-cross-origin/sharedworker-module.http.html43
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.meta/strict-origin-when-cross-origin/worker-classic.http.html43
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.meta/strict-origin-when-cross-origin/worker-module.http.html43
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.meta/strict-origin-when-cross-origin/xhr.http.html143
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.meta/strict-origin/a-tag.http.html63
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.meta/strict-origin/fetch.http.html143
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.meta/strict-origin/iframe-tag.http.html143
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.meta/strict-origin/img-tag.http.html143
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.meta/strict-origin/script-tag-dynamic-import.http.html143
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.meta/strict-origin/script-tag.http.html143
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.meta/strict-origin/sharedworker-classic.http.html43
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.meta/strict-origin/sharedworker-module.http.html43
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.meta/strict-origin/worker-classic.http.html43
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.meta/strict-origin/worker-module.http.html43
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.meta/strict-origin/xhr.http.html143
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.meta/unsafe-url/a-tag.http.html63
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.meta/unsafe-url/fetch.http.html143
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.meta/unsafe-url/iframe-tag.http.html143
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.meta/unsafe-url/img-tag.http.html143
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.meta/unsafe-url/script-tag-dynamic-import.http.html143
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.meta/unsafe-url/script-tag.http.html143
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.meta/unsafe-url/sharedworker-classic.http.html43
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.meta/unsafe-url/sharedworker-module.http.html43
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.meta/unsafe-url/worker-classic.http.html43
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.meta/unsafe-url/worker-module.http.html43
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.meta/unsafe-url/xhr.http.html143
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.meta/unset/a-tag.http.html62
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.meta/unset/fetch.http.html142
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.meta/unset/iframe-tag.http.html142
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.meta/unset/img-tag.http.html142
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.meta/unset/script-tag-dynamic-import.http.html142
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.meta/unset/script-tag.http.html142
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.meta/unset/sharedworker-classic.http.html42
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.meta/unset/sharedworker-module.http.html42
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.meta/unset/worker-classic.http.html42
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.meta/unset/worker-module.http.html42
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/top.meta/unset/xhr.http.html142
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/worker-classic.http-rp/no-referrer-when-downgrade/fetch.http.html275
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/worker-classic.http-rp/no-referrer-when-downgrade/worker-classic.http.html65
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/worker-classic.http-rp/no-referrer-when-downgrade/worker-module.http.html65
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/worker-classic.http-rp/no-referrer-when-downgrade/xhr.http.html275
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/worker-classic.http-rp/no-referrer/fetch.http.html275
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/worker-classic.http-rp/no-referrer/worker-classic.http.html65
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/worker-classic.http-rp/no-referrer/worker-module.http.html65
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/worker-classic.http-rp/no-referrer/xhr.http.html275
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/worker-classic.http-rp/origin-when-cross-origin/fetch.http.html275
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/worker-classic.http-rp/origin-when-cross-origin/worker-classic.http.html65
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/worker-classic.http-rp/origin-when-cross-origin/worker-module.http.html65
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/worker-classic.http-rp/origin-when-cross-origin/xhr.http.html275
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/worker-classic.http-rp/origin/fetch.http.html275
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/worker-classic.http-rp/origin/worker-classic.http.html65
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/worker-classic.http-rp/origin/worker-module.http.html65
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/worker-classic.http-rp/origin/xhr.http.html275
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/worker-classic.http-rp/same-origin/fetch.http.html233
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/worker-classic.http-rp/same-origin/worker-classic.http.html65
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/worker-classic.http-rp/same-origin/worker-module.http.html65
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/worker-classic.http-rp/same-origin/xhr.http.html233
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/worker-classic.http-rp/strict-origin-when-cross-origin/fetch.http.html275
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/worker-classic.http-rp/strict-origin-when-cross-origin/worker-classic.http.html65
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/worker-classic.http-rp/strict-origin-when-cross-origin/worker-module.http.html65
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/worker-classic.http-rp/strict-origin-when-cross-origin/xhr.http.html275
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/worker-classic.http-rp/strict-origin/fetch.http.html275
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/worker-classic.http-rp/strict-origin/worker-classic.http.html65
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/worker-classic.http-rp/strict-origin/worker-module.http.html65
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/worker-classic.http-rp/strict-origin/xhr.http.html275
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/worker-classic.http-rp/unsafe-url/fetch.http.html275
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/worker-classic.http-rp/unsafe-url/worker-classic.http.html65
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/worker-classic.http-rp/unsafe-url/worker-module.http.html65
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/worker-classic.http-rp/unsafe-url/xhr.http.html275
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/worker-classic.http-rp/unset/fetch.http.html203
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/worker-classic.http-rp/unset/worker-classic.http.html53
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/worker-classic.http-rp/unset/worker-module.http.html53
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/worker-classic.http-rp/unset/xhr.http.html203
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/worker-module.http-rp/no-referrer-when-downgrade/fetch.http.html275
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/worker-module.http-rp/no-referrer-when-downgrade/worker-classic.http.html65
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/worker-module.http-rp/no-referrer-when-downgrade/worker-module.http.html65
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/worker-module.http-rp/no-referrer-when-downgrade/xhr.http.html275
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/worker-module.http-rp/no-referrer/fetch.http.html275
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/worker-module.http-rp/no-referrer/worker-classic.http.html65
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/worker-module.http-rp/no-referrer/worker-module.http.html65
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/worker-module.http-rp/no-referrer/xhr.http.html275
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/worker-module.http-rp/origin-when-cross-origin/fetch.http.html275
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/worker-module.http-rp/origin-when-cross-origin/worker-classic.http.html65
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/worker-module.http-rp/origin-when-cross-origin/worker-module.http.html65
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/worker-module.http-rp/origin-when-cross-origin/xhr.http.html275
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/worker-module.http-rp/origin/fetch.http.html275
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/worker-module.http-rp/origin/worker-classic.http.html65
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/worker-module.http-rp/origin/worker-module.http.html65
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/worker-module.http-rp/origin/xhr.http.html275
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/worker-module.http-rp/same-origin/fetch.http.html233
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/worker-module.http-rp/same-origin/worker-classic.http.html65
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/worker-module.http-rp/same-origin/worker-module.http.html65
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/worker-module.http-rp/same-origin/xhr.http.html233
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/worker-module.http-rp/strict-origin-when-cross-origin/fetch.http.html275
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/worker-module.http-rp/strict-origin-when-cross-origin/worker-classic.http.html65
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/worker-module.http-rp/strict-origin-when-cross-origin/worker-module.http.html65
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/worker-module.http-rp/strict-origin-when-cross-origin/xhr.http.html275
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/worker-module.http-rp/strict-origin/fetch.http.html275
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/worker-module.http-rp/strict-origin/worker-classic.http.html65
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/worker-module.http-rp/strict-origin/worker-module.http.html65
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/worker-module.http-rp/strict-origin/xhr.http.html275
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/worker-module.http-rp/unsafe-url/fetch.http.html275
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/worker-module.http-rp/unsafe-url/worker-classic.http.html65
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/worker-module.http-rp/unsafe-url/worker-module.http.html65
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/worker-module.http-rp/unsafe-url/xhr.http.html275
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/worker-module.http-rp/unset/fetch.http.html203
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/worker-module.http-rp/unset/worker-classic.http.html53
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/worker-module.http-rp/unset/worker-module.http.html53
-rw-r--r--testing/web-platform/tests/referrer-policy/gen/worker-module.http-rp/unset/xhr.http.html203
-rw-r--r--testing/web-platform/tests/referrer-policy/generic/first-meta-changed-after-second-added.http.html36
-rw-r--r--testing/web-platform/tests/referrer-policy/generic/iframe-src-change.html37
-rw-r--r--testing/web-platform/tests/referrer-policy/generic/iframe-upgrade-request-to-cross-origin.sub.html26
-rw-r--r--testing/web-platform/tests/referrer-policy/generic/iframe-upgrade-request-to-cross-origin.sub.html.headers1
-rw-r--r--testing/web-platform/tests/referrer-policy/generic/iframe-upgrade-request-to-same-origin.sub.https.html21
-rw-r--r--testing/web-platform/tests/referrer-policy/generic/iframe-upgrade-request-to-same-origin.sub.https.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/generic/inheritance/iframe-inheritance-about-blank.html107
-rw-r--r--testing/web-platform/tests/referrer-policy/generic/inheritance/iframe-inheritance-data.html27
-rw-r--r--testing/web-platform/tests/referrer-policy/generic/inheritance/iframe-inheritance-document-write.html34
-rw-r--r--testing/web-platform/tests/referrer-policy/generic/inheritance/iframe-inheritance-history-about-blank.html80
-rw-r--r--testing/web-platform/tests/referrer-policy/generic/inheritance/iframe-inheritance-history-about-srcdoc.html73
-rw-r--r--testing/web-platform/tests/referrer-policy/generic/inheritance/iframe-inheritance-javascript-child.html77
-rw-r--r--testing/web-platform/tests/referrer-policy/generic/inheritance/iframe-inheritance-javascript.html45
-rw-r--r--testing/web-platform/tests/referrer-policy/generic/inheritance/iframe-inheritance-srcdoc-child.html34
-rw-r--r--testing/web-platform/tests/referrer-policy/generic/inheritance/iframe-inheritance-srcdoc.html45
-rw-r--r--testing/web-platform/tests/referrer-policy/generic/inheritance/popup-inheritance-about-blank.html105
-rw-r--r--testing/web-platform/tests/referrer-policy/generic/inheritance/popup-inheritance-form-submission.html30
-rw-r--r--testing/web-platform/tests/referrer-policy/generic/inheritance/resources/make-html-script.js19
-rw-r--r--testing/web-platform/tests/referrer-policy/generic/inheritance/resources/submit-form-and-remove-frame.html10
-rw-r--r--testing/web-platform/tests/referrer-policy/generic/inheritance/workers.html47
-rw-r--r--testing/web-platform/tests/referrer-policy/generic/link-rel-prefetch.html28
-rw-r--r--testing/web-platform/tests/referrer-policy/generic/meta-referrer-outofhead-fetch.http.html21
-rw-r--r--testing/web-platform/tests/referrer-policy/generic/meta-referrer-removed-1.http.html25
-rw-r--r--testing/web-platform/tests/referrer-policy/generic/meta-referrer-removed-2.http.html34
-rw-r--r--testing/web-platform/tests/referrer-policy/generic/meta-tag-in-svg-image.html31
-rw-r--r--testing/web-platform/tests/referrer-policy/generic/multiple-headers-and-values.html30
-rw-r--r--testing/web-platform/tests/referrer-policy/generic/multiple-headers-and-values.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/generic/multiple-headers-combined.html30
-rw-r--r--testing/web-platform/tests/referrer-policy/generic/multiple-headers-combined.html.headers1
-rw-r--r--testing/web-platform/tests/referrer-policy/generic/multiple-headers-one-invalid.html34
-rw-r--r--testing/web-platform/tests/referrer-policy/generic/multiple-headers-one-invalid.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/generic/multiple-headers-one-unknown-token.html30
-rw-r--r--testing/web-platform/tests/referrer-policy/generic/multiple-headers-one-unknown-token.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/generic/multiple-headers.html30
-rw-r--r--testing/web-platform/tests/referrer-policy/generic/multiple-headers.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/generic/resources/img-with-referrer-policy.svg6
-rw-r--r--testing/web-platform/tests/referrer-policy/generic/resources/referrer.py10
-rw-r--r--testing/web-platform/tests/referrer-policy/generic/sandboxed-iframe-with-opaque-origin.html93
-rw-r--r--testing/web-platform/tests/referrer-policy/generic/sanity-checker.js46
-rw-r--r--testing/web-platform/tests/referrer-policy/generic/second-meta-referrer-added-before-first.http.html31
-rw-r--r--testing/web-platform/tests/referrer-policy/generic/subresource-test/area-navigate.html39
-rw-r--r--testing/web-platform/tests/referrer-policy/generic/subresource-test/attr-referrer-invalid-value.html25
-rw-r--r--testing/web-platform/tests/referrer-policy/generic/subresource-test/fetch-messaging.html42
-rw-r--r--testing/web-platform/tests/referrer-policy/generic/subresource-test/iframe-messaging.html38
-rw-r--r--testing/web-platform/tests/referrer-policy/generic/subresource-test/image-decoding.html38
-rw-r--r--testing/web-platform/tests/referrer-policy/generic/subresource-test/link-navigate.html38
-rw-r--r--testing/web-platform/tests/referrer-policy/generic/subresource-test/script-messaging.html38
-rw-r--r--testing/web-platform/tests/referrer-policy/generic/subresource-test/worker-messaging.html38
-rw-r--r--testing/web-platform/tests/referrer-policy/generic/subresource-test/xhr-messaging.html38
-rw-r--r--testing/web-platform/tests/referrer-policy/generic/test-case.sub.js127
-rw-r--r--testing/web-platform/tests/referrer-policy/generic/unsupported-csp-referrer-directive.html29
-rw-r--r--testing/web-platform/tests/referrer-policy/spec.src.json1134
1628 files changed, 153947 insertions, 0 deletions
diff --git a/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/no-referrer-when-downgrade/a-tag.http.html b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/no-referrer-when-downgrade/a-tag.http.html
new file mode 100644
index 0000000000..2641813ea7
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/no-referrer-when-downgrade/a-tag.http.html
@@ -0,0 +1,63 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K+1/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../../generic/test-case.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "a-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for a-tag to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "a-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for a-tag to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "a-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for a-tag to same-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "a-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for a-tag to same-https origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/no-referrer-when-downgrade/a-tag.http.html.headers b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/no-referrer-when-downgrade/a-tag.http.html.headers
new file mode 100644
index 0000000000..180358e691
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/no-referrer-when-downgrade/a-tag.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: no-referrer-when-downgrade
diff --git a/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/no-referrer-when-downgrade/fetch.http.html b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/no-referrer-when-downgrade/fetch.http.html
new file mode 100644
index 0000000000..8f682e685a
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/no-referrer-when-downgrade/fetch.http.html
@@ -0,0 +1,143 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K+1/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../../generic/test-case.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-https origin and swap-origin redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/no-referrer-when-downgrade/fetch.http.html.headers b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/no-referrer-when-downgrade/fetch.http.html.headers
new file mode 100644
index 0000000000..180358e691
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/no-referrer-when-downgrade/fetch.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: no-referrer-when-downgrade
diff --git a/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/no-referrer-when-downgrade/iframe-tag.http.html b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/no-referrer-when-downgrade/iframe-tag.http.html
new file mode 100644
index 0000000000..31111c3cce
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/no-referrer-when-downgrade/iframe-tag.http.html
@@ -0,0 +1,143 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K+1/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../../generic/test-case.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-https origin and swap-origin redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/no-referrer-when-downgrade/iframe-tag.http.html.headers b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/no-referrer-when-downgrade/iframe-tag.http.html.headers
new file mode 100644
index 0000000000..180358e691
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/no-referrer-when-downgrade/iframe-tag.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: no-referrer-when-downgrade
diff --git a/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/no-referrer-when-downgrade/img-tag.http.html b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/no-referrer-when-downgrade/img-tag.http.html
new file mode 100644
index 0000000000..5985002bc7
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/no-referrer-when-downgrade/img-tag.http.html
@@ -0,0 +1,143 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K+1/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../../generic/test-case.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-https origin and swap-origin redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/no-referrer-when-downgrade/img-tag.http.html.headers b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/no-referrer-when-downgrade/img-tag.http.html.headers
new file mode 100644
index 0000000000..180358e691
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/no-referrer-when-downgrade/img-tag.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: no-referrer-when-downgrade
diff --git a/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/no-referrer-when-downgrade/script-tag.http.html b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/no-referrer-when-downgrade/script-tag.http.html
new file mode 100644
index 0000000000..4a62f71b44
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/no-referrer-when-downgrade/script-tag.http.html
@@ -0,0 +1,143 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K+1/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../../generic/test-case.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-https origin and swap-origin redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/no-referrer-when-downgrade/script-tag.http.html.headers b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/no-referrer-when-downgrade/script-tag.http.html.headers
new file mode 100644
index 0000000000..180358e691
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/no-referrer-when-downgrade/script-tag.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: no-referrer-when-downgrade
diff --git a/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/no-referrer-when-downgrade/sharedworker-classic.http.html b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/no-referrer-when-downgrade/sharedworker-classic.http.html
new file mode 100644
index 0000000000..6feb01bda6
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/no-referrer-when-downgrade/sharedworker-classic.http.html
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K+1/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../../generic/test-case.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "sharedworker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for sharedworker-classic to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "sharedworker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for sharedworker-classic to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/no-referrer-when-downgrade/sharedworker-classic.http.html.headers b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/no-referrer-when-downgrade/sharedworker-classic.http.html.headers
new file mode 100644
index 0000000000..180358e691
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/no-referrer-when-downgrade/sharedworker-classic.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: no-referrer-when-downgrade
diff --git a/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/no-referrer-when-downgrade/worker-classic.http.html b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/no-referrer-when-downgrade/worker-classic.http.html
new file mode 100644
index 0000000000..43642c590d
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/no-referrer-when-downgrade/worker-classic.http.html
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K+1/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../../generic/test-case.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "worker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-classic to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "worker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-classic to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/no-referrer-when-downgrade/worker-classic.http.html.headers b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/no-referrer-when-downgrade/worker-classic.http.html.headers
new file mode 100644
index 0000000000..180358e691
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/no-referrer-when-downgrade/worker-classic.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: no-referrer-when-downgrade
diff --git a/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/no-referrer-when-downgrade/worker-module.http.html b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/no-referrer-when-downgrade/worker-module.http.html
new file mode 100644
index 0000000000..0d35924ddd
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/no-referrer-when-downgrade/worker-module.http.html
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K+1/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../../generic/test-case.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "worker-module",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-module to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "worker-module",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-module to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/no-referrer-when-downgrade/worker-module.http.html.headers b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/no-referrer-when-downgrade/worker-module.http.html.headers
new file mode 100644
index 0000000000..180358e691
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/no-referrer-when-downgrade/worker-module.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: no-referrer-when-downgrade
diff --git a/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/no-referrer-when-downgrade/xhr.http.html b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/no-referrer-when-downgrade/xhr.http.html
new file mode 100644
index 0000000000..95ef48cdbb
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/no-referrer-when-downgrade/xhr.http.html
@@ -0,0 +1,143 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K+1/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../../generic/test-case.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-https origin and swap-origin redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/no-referrer-when-downgrade/xhr.http.html.headers b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/no-referrer-when-downgrade/xhr.http.html.headers
new file mode 100644
index 0000000000..180358e691
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/no-referrer-when-downgrade/xhr.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: no-referrer-when-downgrade
diff --git a/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/origin-when-cross-origin/a-tag.http.html b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/origin-when-cross-origin/a-tag.http.html
new file mode 100644
index 0000000000..5e2f9f5523
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/origin-when-cross-origin/a-tag.http.html
@@ -0,0 +1,33 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K+1/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../../generic/test-case.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "a-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for a-tag to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/origin-when-cross-origin/a-tag.http.html.headers b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/origin-when-cross-origin/a-tag.http.html.headers
new file mode 100644
index 0000000000..a15ea7c65c
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/origin-when-cross-origin/a-tag.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: origin-when-cross-origin
diff --git a/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/origin-when-cross-origin/fetch.http.html b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/origin-when-cross-origin/fetch.http.html
new file mode 100644
index 0000000000..74334b36cc
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/origin-when-cross-origin/fetch.http.html
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K+1/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../../generic/test-case.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/origin-when-cross-origin/fetch.http.html.headers b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/origin-when-cross-origin/fetch.http.html.headers
new file mode 100644
index 0000000000..a15ea7c65c
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/origin-when-cross-origin/fetch.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: origin-when-cross-origin
diff --git a/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/origin-when-cross-origin/iframe-tag.http.html b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/origin-when-cross-origin/iframe-tag.http.html
new file mode 100644
index 0000000000..569b0ac8e2
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/origin-when-cross-origin/iframe-tag.http.html
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K+1/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../../generic/test-case.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/origin-when-cross-origin/iframe-tag.http.html.headers b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/origin-when-cross-origin/iframe-tag.http.html.headers
new file mode 100644
index 0000000000..a15ea7c65c
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/origin-when-cross-origin/iframe-tag.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: origin-when-cross-origin
diff --git a/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/origin-when-cross-origin/img-tag.http.html b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/origin-when-cross-origin/img-tag.http.html
new file mode 100644
index 0000000000..e04c767ed5
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/origin-when-cross-origin/img-tag.http.html
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K+1/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../../generic/test-case.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/origin-when-cross-origin/img-tag.http.html.headers b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/origin-when-cross-origin/img-tag.http.html.headers
new file mode 100644
index 0000000000..a15ea7c65c
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/origin-when-cross-origin/img-tag.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: origin-when-cross-origin
diff --git a/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/origin-when-cross-origin/script-tag.http.html b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/origin-when-cross-origin/script-tag.http.html
new file mode 100644
index 0000000000..ca1042d6a6
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/origin-when-cross-origin/script-tag.http.html
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K+1/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../../generic/test-case.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/origin-when-cross-origin/script-tag.http.html.headers b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/origin-when-cross-origin/script-tag.http.html.headers
new file mode 100644
index 0000000000..a15ea7c65c
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/origin-when-cross-origin/script-tag.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: origin-when-cross-origin
diff --git a/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/origin-when-cross-origin/sharedworker-classic.http.html b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/origin-when-cross-origin/sharedworker-classic.http.html
new file mode 100644
index 0000000000..6feb01bda6
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/origin-when-cross-origin/sharedworker-classic.http.html
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K+1/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../../generic/test-case.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "sharedworker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for sharedworker-classic to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "sharedworker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for sharedworker-classic to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/origin-when-cross-origin/sharedworker-classic.http.html.headers b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/origin-when-cross-origin/sharedworker-classic.http.html.headers
new file mode 100644
index 0000000000..a15ea7c65c
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/origin-when-cross-origin/sharedworker-classic.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: origin-when-cross-origin
diff --git a/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/origin-when-cross-origin/worker-classic.http.html b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/origin-when-cross-origin/worker-classic.http.html
new file mode 100644
index 0000000000..43642c590d
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/origin-when-cross-origin/worker-classic.http.html
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K+1/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../../generic/test-case.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "worker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-classic to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "worker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-classic to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/origin-when-cross-origin/worker-classic.http.html.headers b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/origin-when-cross-origin/worker-classic.http.html.headers
new file mode 100644
index 0000000000..a15ea7c65c
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/origin-when-cross-origin/worker-classic.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: origin-when-cross-origin
diff --git a/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/origin-when-cross-origin/worker-module.http.html b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/origin-when-cross-origin/worker-module.http.html
new file mode 100644
index 0000000000..0d35924ddd
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/origin-when-cross-origin/worker-module.http.html
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K+1/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../../generic/test-case.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "worker-module",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-module to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "worker-module",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-module to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/origin-when-cross-origin/worker-module.http.html.headers b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/origin-when-cross-origin/worker-module.http.html.headers
new file mode 100644
index 0000000000..a15ea7c65c
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/origin-when-cross-origin/worker-module.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: origin-when-cross-origin
diff --git a/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/origin-when-cross-origin/xhr.http.html b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/origin-when-cross-origin/xhr.http.html
new file mode 100644
index 0000000000..7814f3492d
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/origin-when-cross-origin/xhr.http.html
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K+1/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../../generic/test-case.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/origin-when-cross-origin/xhr.http.html.headers b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/origin-when-cross-origin/xhr.http.html.headers
new file mode 100644
index 0000000000..a15ea7c65c
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/origin-when-cross-origin/xhr.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: origin-when-cross-origin
diff --git a/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/same-origin/a-tag.http.html b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/same-origin/a-tag.http.html
new file mode 100644
index 0000000000..5e2f9f5523
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/same-origin/a-tag.http.html
@@ -0,0 +1,33 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K+1/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../../generic/test-case.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "a-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for a-tag to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/same-origin/a-tag.http.html.headers b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/same-origin/a-tag.http.html.headers
new file mode 100644
index 0000000000..be66cf9321
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/same-origin/a-tag.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: same-origin
diff --git a/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/same-origin/fetch.http.html b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/same-origin/fetch.http.html
new file mode 100644
index 0000000000..74334b36cc
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/same-origin/fetch.http.html
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K+1/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../../generic/test-case.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/same-origin/fetch.http.html.headers b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/same-origin/fetch.http.html.headers
new file mode 100644
index 0000000000..be66cf9321
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/same-origin/fetch.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: same-origin
diff --git a/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/same-origin/iframe-tag.http.html b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/same-origin/iframe-tag.http.html
new file mode 100644
index 0000000000..569b0ac8e2
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/same-origin/iframe-tag.http.html
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K+1/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../../generic/test-case.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/same-origin/iframe-tag.http.html.headers b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/same-origin/iframe-tag.http.html.headers
new file mode 100644
index 0000000000..be66cf9321
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/same-origin/iframe-tag.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: same-origin
diff --git a/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/same-origin/img-tag.http.html b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/same-origin/img-tag.http.html
new file mode 100644
index 0000000000..e04c767ed5
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/same-origin/img-tag.http.html
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K+1/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../../generic/test-case.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/same-origin/img-tag.http.html.headers b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/same-origin/img-tag.http.html.headers
new file mode 100644
index 0000000000..be66cf9321
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/same-origin/img-tag.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: same-origin
diff --git a/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/same-origin/script-tag.http.html b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/same-origin/script-tag.http.html
new file mode 100644
index 0000000000..ca1042d6a6
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/same-origin/script-tag.http.html
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K+1/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../../generic/test-case.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/same-origin/script-tag.http.html.headers b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/same-origin/script-tag.http.html.headers
new file mode 100644
index 0000000000..be66cf9321
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/same-origin/script-tag.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: same-origin
diff --git a/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/same-origin/sharedworker-classic.http.html b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/same-origin/sharedworker-classic.http.html
new file mode 100644
index 0000000000..6feb01bda6
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/same-origin/sharedworker-classic.http.html
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K+1/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../../generic/test-case.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "sharedworker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for sharedworker-classic to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "sharedworker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for sharedworker-classic to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/same-origin/sharedworker-classic.http.html.headers b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/same-origin/sharedworker-classic.http.html.headers
new file mode 100644
index 0000000000..be66cf9321
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/same-origin/sharedworker-classic.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: same-origin
diff --git a/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/same-origin/worker-classic.http.html b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/same-origin/worker-classic.http.html
new file mode 100644
index 0000000000..43642c590d
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/same-origin/worker-classic.http.html
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K+1/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../../generic/test-case.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "worker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-classic to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "worker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-classic to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/same-origin/worker-classic.http.html.headers b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/same-origin/worker-classic.http.html.headers
new file mode 100644
index 0000000000..be66cf9321
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/same-origin/worker-classic.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: same-origin
diff --git a/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/same-origin/worker-module.http.html b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/same-origin/worker-module.http.html
new file mode 100644
index 0000000000..0d35924ddd
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/same-origin/worker-module.http.html
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K+1/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../../generic/test-case.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "worker-module",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-module to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "worker-module",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-module to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/same-origin/worker-module.http.html.headers b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/same-origin/worker-module.http.html.headers
new file mode 100644
index 0000000000..be66cf9321
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/same-origin/worker-module.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: same-origin
diff --git a/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/same-origin/xhr.http.html b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/same-origin/xhr.http.html
new file mode 100644
index 0000000000..7814f3492d
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/same-origin/xhr.http.html
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K+1/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../../generic/test-case.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/same-origin/xhr.http.html.headers b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/same-origin/xhr.http.html.headers
new file mode 100644
index 0000000000..be66cf9321
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/same-origin/xhr.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: same-origin
diff --git a/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/strict-origin-when-cross-origin/a-tag.http.html b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/strict-origin-when-cross-origin/a-tag.http.html
new file mode 100644
index 0000000000..5e2f9f5523
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/strict-origin-when-cross-origin/a-tag.http.html
@@ -0,0 +1,33 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K+1/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../../generic/test-case.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "a-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for a-tag to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/strict-origin-when-cross-origin/a-tag.http.html.headers b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/strict-origin-when-cross-origin/a-tag.http.html.headers
new file mode 100644
index 0000000000..4cff1d12f8
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/strict-origin-when-cross-origin/a-tag.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: strict-origin-when-cross-origin
diff --git a/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/strict-origin-when-cross-origin/fetch.http.html b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/strict-origin-when-cross-origin/fetch.http.html
new file mode 100644
index 0000000000..74334b36cc
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/strict-origin-when-cross-origin/fetch.http.html
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K+1/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../../generic/test-case.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/strict-origin-when-cross-origin/fetch.http.html.headers b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/strict-origin-when-cross-origin/fetch.http.html.headers
new file mode 100644
index 0000000000..4cff1d12f8
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/strict-origin-when-cross-origin/fetch.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: strict-origin-when-cross-origin
diff --git a/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/strict-origin-when-cross-origin/iframe-tag.http.html b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/strict-origin-when-cross-origin/iframe-tag.http.html
new file mode 100644
index 0000000000..569b0ac8e2
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/strict-origin-when-cross-origin/iframe-tag.http.html
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K+1/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../../generic/test-case.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/strict-origin-when-cross-origin/iframe-tag.http.html.headers b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/strict-origin-when-cross-origin/iframe-tag.http.html.headers
new file mode 100644
index 0000000000..4cff1d12f8
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/strict-origin-when-cross-origin/iframe-tag.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: strict-origin-when-cross-origin
diff --git a/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/strict-origin-when-cross-origin/img-tag.http.html b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/strict-origin-when-cross-origin/img-tag.http.html
new file mode 100644
index 0000000000..e04c767ed5
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/strict-origin-when-cross-origin/img-tag.http.html
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K+1/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../../generic/test-case.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/strict-origin-when-cross-origin/img-tag.http.html.headers b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/strict-origin-when-cross-origin/img-tag.http.html.headers
new file mode 100644
index 0000000000..4cff1d12f8
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/strict-origin-when-cross-origin/img-tag.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: strict-origin-when-cross-origin
diff --git a/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/strict-origin-when-cross-origin/script-tag.http.html b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/strict-origin-when-cross-origin/script-tag.http.html
new file mode 100644
index 0000000000..ca1042d6a6
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/strict-origin-when-cross-origin/script-tag.http.html
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K+1/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../../generic/test-case.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/strict-origin-when-cross-origin/script-tag.http.html.headers b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/strict-origin-when-cross-origin/script-tag.http.html.headers
new file mode 100644
index 0000000000..4cff1d12f8
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/strict-origin-when-cross-origin/script-tag.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: strict-origin-when-cross-origin
diff --git a/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/strict-origin-when-cross-origin/sharedworker-classic.http.html b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/strict-origin-when-cross-origin/sharedworker-classic.http.html
new file mode 100644
index 0000000000..6feb01bda6
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/strict-origin-when-cross-origin/sharedworker-classic.http.html
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K+1/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../../generic/test-case.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "sharedworker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for sharedworker-classic to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "sharedworker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for sharedworker-classic to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/strict-origin-when-cross-origin/sharedworker-classic.http.html.headers b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/strict-origin-when-cross-origin/sharedworker-classic.http.html.headers
new file mode 100644
index 0000000000..4cff1d12f8
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/strict-origin-when-cross-origin/sharedworker-classic.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: strict-origin-when-cross-origin
diff --git a/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/strict-origin-when-cross-origin/worker-classic.http.html b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/strict-origin-when-cross-origin/worker-classic.http.html
new file mode 100644
index 0000000000..43642c590d
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/strict-origin-when-cross-origin/worker-classic.http.html
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K+1/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../../generic/test-case.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "worker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-classic to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "worker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-classic to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/strict-origin-when-cross-origin/worker-classic.http.html.headers b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/strict-origin-when-cross-origin/worker-classic.http.html.headers
new file mode 100644
index 0000000000..4cff1d12f8
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/strict-origin-when-cross-origin/worker-classic.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: strict-origin-when-cross-origin
diff --git a/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/strict-origin-when-cross-origin/worker-module.http.html b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/strict-origin-when-cross-origin/worker-module.http.html
new file mode 100644
index 0000000000..0d35924ddd
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/strict-origin-when-cross-origin/worker-module.http.html
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K+1/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../../generic/test-case.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "worker-module",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-module to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "worker-module",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-module to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/strict-origin-when-cross-origin/worker-module.http.html.headers b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/strict-origin-when-cross-origin/worker-module.http.html.headers
new file mode 100644
index 0000000000..4cff1d12f8
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/strict-origin-when-cross-origin/worker-module.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: strict-origin-when-cross-origin
diff --git a/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/strict-origin-when-cross-origin/xhr.http.html b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/strict-origin-when-cross-origin/xhr.http.html
new file mode 100644
index 0000000000..7814f3492d
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/strict-origin-when-cross-origin/xhr.http.html
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K+1/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../../generic/test-case.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/strict-origin-when-cross-origin/xhr.http.html.headers b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/strict-origin-when-cross-origin/xhr.http.html.headers
new file mode 100644
index 0000000000..4cff1d12f8
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/strict-origin-when-cross-origin/xhr.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: strict-origin-when-cross-origin
diff --git a/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/unsafe-url/a-tag.http.html b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/unsafe-url/a-tag.http.html
new file mode 100644
index 0000000000..2641813ea7
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/unsafe-url/a-tag.http.html
@@ -0,0 +1,63 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K+1/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../../generic/test-case.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "a-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for a-tag to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "a-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for a-tag to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "a-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for a-tag to same-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "a-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for a-tag to same-https origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/unsafe-url/a-tag.http.html.headers b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/unsafe-url/a-tag.http.html.headers
new file mode 100644
index 0000000000..c1d3fd1a0b
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/unsafe-url/a-tag.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: unsafe-url
diff --git a/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/unsafe-url/fetch.http.html b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/unsafe-url/fetch.http.html
new file mode 100644
index 0000000000..8f682e685a
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/unsafe-url/fetch.http.html
@@ -0,0 +1,143 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K+1/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../../generic/test-case.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-https origin and swap-origin redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/unsafe-url/fetch.http.html.headers b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/unsafe-url/fetch.http.html.headers
new file mode 100644
index 0000000000..c1d3fd1a0b
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/unsafe-url/fetch.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: unsafe-url
diff --git a/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/unsafe-url/iframe-tag.http.html b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/unsafe-url/iframe-tag.http.html
new file mode 100644
index 0000000000..31111c3cce
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/unsafe-url/iframe-tag.http.html
@@ -0,0 +1,143 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K+1/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../../generic/test-case.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-https origin and swap-origin redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/unsafe-url/iframe-tag.http.html.headers b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/unsafe-url/iframe-tag.http.html.headers
new file mode 100644
index 0000000000..c1d3fd1a0b
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/unsafe-url/iframe-tag.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: unsafe-url
diff --git a/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/unsafe-url/img-tag.http.html b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/unsafe-url/img-tag.http.html
new file mode 100644
index 0000000000..5985002bc7
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/unsafe-url/img-tag.http.html
@@ -0,0 +1,143 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K+1/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../../generic/test-case.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-https origin and swap-origin redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/unsafe-url/img-tag.http.html.headers b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/unsafe-url/img-tag.http.html.headers
new file mode 100644
index 0000000000..c1d3fd1a0b
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/unsafe-url/img-tag.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: unsafe-url
diff --git a/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/unsafe-url/script-tag.http.html b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/unsafe-url/script-tag.http.html
new file mode 100644
index 0000000000..4a62f71b44
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/unsafe-url/script-tag.http.html
@@ -0,0 +1,143 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K+1/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../../generic/test-case.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-https origin and swap-origin redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/unsafe-url/script-tag.http.html.headers b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/unsafe-url/script-tag.http.html.headers
new file mode 100644
index 0000000000..c1d3fd1a0b
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/unsafe-url/script-tag.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: unsafe-url
diff --git a/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/unsafe-url/sharedworker-classic.http.html b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/unsafe-url/sharedworker-classic.http.html
new file mode 100644
index 0000000000..6feb01bda6
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/unsafe-url/sharedworker-classic.http.html
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K+1/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../../generic/test-case.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "sharedworker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for sharedworker-classic to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "sharedworker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for sharedworker-classic to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/unsafe-url/sharedworker-classic.http.html.headers b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/unsafe-url/sharedworker-classic.http.html.headers
new file mode 100644
index 0000000000..c1d3fd1a0b
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/unsafe-url/sharedworker-classic.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: unsafe-url
diff --git a/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/unsafe-url/worker-classic.http.html b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/unsafe-url/worker-classic.http.html
new file mode 100644
index 0000000000..43642c590d
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/unsafe-url/worker-classic.http.html
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K+1/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../../generic/test-case.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "worker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-classic to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "worker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-classic to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/unsafe-url/worker-classic.http.html.headers b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/unsafe-url/worker-classic.http.html.headers
new file mode 100644
index 0000000000..c1d3fd1a0b
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/unsafe-url/worker-classic.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: unsafe-url
diff --git a/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/unsafe-url/worker-module.http.html b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/unsafe-url/worker-module.http.html
new file mode 100644
index 0000000000..0d35924ddd
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/unsafe-url/worker-module.http.html
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K+1/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../../generic/test-case.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "worker-module",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-module to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "worker-module",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-module to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/unsafe-url/worker-module.http.html.headers b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/unsafe-url/worker-module.http.html.headers
new file mode 100644
index 0000000000..c1d3fd1a0b
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/unsafe-url/worker-module.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: unsafe-url
diff --git a/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/unsafe-url/xhr.http.html b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/unsafe-url/xhr.http.html
new file mode 100644
index 0000000000..95ef48cdbb
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/unsafe-url/xhr.http.html
@@ -0,0 +1,143 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K+1/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../../generic/test-case.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-https origin and swap-origin redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/unsafe-url/xhr.http.html.headers b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/unsafe-url/xhr.http.html.headers
new file mode 100644
index 0000000000..c1d3fd1a0b
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/unsafe-url/xhr.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: unsafe-url
diff --git a/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/unset/a-tag.http.html b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/unset/a-tag.http.html
new file mode 100644
index 0000000000..5e2f9f5523
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/unset/a-tag.http.html
@@ -0,0 +1,33 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K+1/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../../generic/test-case.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "a-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for a-tag to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/unset/fetch.http.html b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/unset/fetch.http.html
new file mode 100644
index 0000000000..74334b36cc
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/unset/fetch.http.html
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K+1/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../../generic/test-case.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/unset/iframe-tag.http.html b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/unset/iframe-tag.http.html
new file mode 100644
index 0000000000..569b0ac8e2
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/unset/iframe-tag.http.html
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K+1/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../../generic/test-case.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/unset/img-tag.http.html b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/unset/img-tag.http.html
new file mode 100644
index 0000000000..e04c767ed5
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/unset/img-tag.http.html
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K+1/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../../generic/test-case.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/unset/script-tag.http.html b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/unset/script-tag.http.html
new file mode 100644
index 0000000000..ca1042d6a6
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/unset/script-tag.http.html
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K+1/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../../generic/test-case.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/unset/sharedworker-classic.http.html b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/unset/sharedworker-classic.http.html
new file mode 100644
index 0000000000..6feb01bda6
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/unset/sharedworker-classic.http.html
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K+1/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../../generic/test-case.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "sharedworker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for sharedworker-classic to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "sharedworker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for sharedworker-classic to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/unset/worker-classic.http.html b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/unset/worker-classic.http.html
new file mode 100644
index 0000000000..43642c590d
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/unset/worker-classic.http.html
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K+1/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../../generic/test-case.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "worker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-classic to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "worker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-classic to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/unset/worker-module.http.html b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/unset/worker-module.http.html
new file mode 100644
index 0000000000..0d35924ddd
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/unset/worker-module.http.html
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K+1/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../../generic/test-case.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "worker-module",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-module to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "worker-module",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-module to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/unset/xhr.http.html b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/unset/xhr.http.html
new file mode 100644
index 0000000000..7814f3492d
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/unset/xhr.http.html
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K+1/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../../generic/test-case.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K+1/gen/top.meta/no-referrer-when-downgrade/a-tag.http.html b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.meta/no-referrer-when-downgrade/a-tag.http.html
new file mode 100644
index 0000000000..ca14aa2021
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.meta/no-referrer-when-downgrade/a-tag.http.html
@@ -0,0 +1,64 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K+1/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <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>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "a-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for a-tag to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "a-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for a-tag to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "a-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for a-tag to same-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "a-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for a-tag to same-https origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K+1/gen/top.meta/no-referrer-when-downgrade/fetch.http.html b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.meta/no-referrer-when-downgrade/fetch.http.html
new file mode 100644
index 0000000000..30c1f6b7b3
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.meta/no-referrer-when-downgrade/fetch.http.html
@@ -0,0 +1,144 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K+1/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <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>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-https origin and swap-origin redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K+1/gen/top.meta/no-referrer-when-downgrade/iframe-tag.http.html b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.meta/no-referrer-when-downgrade/iframe-tag.http.html
new file mode 100644
index 0000000000..fddad73959
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.meta/no-referrer-when-downgrade/iframe-tag.http.html
@@ -0,0 +1,144 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K+1/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <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>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-https origin and swap-origin redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K+1/gen/top.meta/no-referrer-when-downgrade/img-tag.http.html b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.meta/no-referrer-when-downgrade/img-tag.http.html
new file mode 100644
index 0000000000..fc9f483852
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.meta/no-referrer-when-downgrade/img-tag.http.html
@@ -0,0 +1,144 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K+1/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <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>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-https origin and swap-origin redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K+1/gen/top.meta/no-referrer-when-downgrade/script-tag.http.html b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.meta/no-referrer-when-downgrade/script-tag.http.html
new file mode 100644
index 0000000000..b49b75993d
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.meta/no-referrer-when-downgrade/script-tag.http.html
@@ -0,0 +1,144 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K+1/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <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>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-https origin and swap-origin redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K+1/gen/top.meta/no-referrer-when-downgrade/sharedworker-classic.http.html b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.meta/no-referrer-when-downgrade/sharedworker-classic.http.html
new file mode 100644
index 0000000000..eff936cf6e
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.meta/no-referrer-when-downgrade/sharedworker-classic.http.html
@@ -0,0 +1,44 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K+1/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <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>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "sharedworker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for sharedworker-classic to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "sharedworker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for sharedworker-classic to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K+1/gen/top.meta/no-referrer-when-downgrade/worker-classic.http.html b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.meta/no-referrer-when-downgrade/worker-classic.http.html
new file mode 100644
index 0000000000..39faff772f
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.meta/no-referrer-when-downgrade/worker-classic.http.html
@@ -0,0 +1,44 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K+1/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <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>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "worker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-classic to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "worker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-classic to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K+1/gen/top.meta/no-referrer-when-downgrade/worker-module.http.html b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.meta/no-referrer-when-downgrade/worker-module.http.html
new file mode 100644
index 0000000000..64c75d88f8
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.meta/no-referrer-when-downgrade/worker-module.http.html
@@ -0,0 +1,44 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K+1/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <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>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "worker-module",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-module to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "worker-module",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-module to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K+1/gen/top.meta/no-referrer-when-downgrade/xhr.http.html b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.meta/no-referrer-when-downgrade/xhr.http.html
new file mode 100644
index 0000000000..1ebfe2059a
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.meta/no-referrer-when-downgrade/xhr.http.html
@@ -0,0 +1,144 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K+1/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <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>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-https origin and swap-origin redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K+1/gen/top.meta/origin-when-cross-origin/a-tag.http.html b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.meta/origin-when-cross-origin/a-tag.http.html
new file mode 100644
index 0000000000..452afa5b6c
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.meta/origin-when-cross-origin/a-tag.http.html
@@ -0,0 +1,34 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K+1/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <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>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "a-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for a-tag to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K+1/gen/top.meta/origin-when-cross-origin/fetch.http.html b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.meta/origin-when-cross-origin/fetch.http.html
new file mode 100644
index 0000000000..0d42da39dc
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.meta/origin-when-cross-origin/fetch.http.html
@@ -0,0 +1,44 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K+1/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <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>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K+1/gen/top.meta/origin-when-cross-origin/iframe-tag.http.html b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.meta/origin-when-cross-origin/iframe-tag.http.html
new file mode 100644
index 0000000000..9a36013b9c
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.meta/origin-when-cross-origin/iframe-tag.http.html
@@ -0,0 +1,44 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K+1/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <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>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K+1/gen/top.meta/origin-when-cross-origin/img-tag.http.html b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.meta/origin-when-cross-origin/img-tag.http.html
new file mode 100644
index 0000000000..0bdab01f70
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.meta/origin-when-cross-origin/img-tag.http.html
@@ -0,0 +1,44 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K+1/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <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>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K+1/gen/top.meta/origin-when-cross-origin/script-tag.http.html b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.meta/origin-when-cross-origin/script-tag.http.html
new file mode 100644
index 0000000000..df36d6dce0
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.meta/origin-when-cross-origin/script-tag.http.html
@@ -0,0 +1,44 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K+1/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <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>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K+1/gen/top.meta/origin-when-cross-origin/sharedworker-classic.http.html b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.meta/origin-when-cross-origin/sharedworker-classic.http.html
new file mode 100644
index 0000000000..51d2a157ac
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.meta/origin-when-cross-origin/sharedworker-classic.http.html
@@ -0,0 +1,44 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K+1/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <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>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "sharedworker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for sharedworker-classic to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "sharedworker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for sharedworker-classic to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K+1/gen/top.meta/origin-when-cross-origin/worker-classic.http.html b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.meta/origin-when-cross-origin/worker-classic.http.html
new file mode 100644
index 0000000000..9d227d6294
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.meta/origin-when-cross-origin/worker-classic.http.html
@@ -0,0 +1,44 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K+1/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <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>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "worker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-classic to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "worker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-classic to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K+1/gen/top.meta/origin-when-cross-origin/worker-module.http.html b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.meta/origin-when-cross-origin/worker-module.http.html
new file mode 100644
index 0000000000..40ce1f1991
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.meta/origin-when-cross-origin/worker-module.http.html
@@ -0,0 +1,44 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K+1/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <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>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "worker-module",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-module to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "worker-module",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-module to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K+1/gen/top.meta/origin-when-cross-origin/xhr.http.html b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.meta/origin-when-cross-origin/xhr.http.html
new file mode 100644
index 0000000000..3cdbc538f2
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.meta/origin-when-cross-origin/xhr.http.html
@@ -0,0 +1,44 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K+1/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <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>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K+1/gen/top.meta/same-origin/a-tag.http.html b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.meta/same-origin/a-tag.http.html
new file mode 100644
index 0000000000..d8114782b4
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.meta/same-origin/a-tag.http.html
@@ -0,0 +1,34 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K+1/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <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>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "a-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for a-tag to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K+1/gen/top.meta/same-origin/fetch.http.html b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.meta/same-origin/fetch.http.html
new file mode 100644
index 0000000000..c1bfe06397
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.meta/same-origin/fetch.http.html
@@ -0,0 +1,44 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K+1/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <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>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K+1/gen/top.meta/same-origin/iframe-tag.http.html b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.meta/same-origin/iframe-tag.http.html
new file mode 100644
index 0000000000..dc3e359db0
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.meta/same-origin/iframe-tag.http.html
@@ -0,0 +1,44 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K+1/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <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>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K+1/gen/top.meta/same-origin/img-tag.http.html b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.meta/same-origin/img-tag.http.html
new file mode 100644
index 0000000000..70eda2aef1
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.meta/same-origin/img-tag.http.html
@@ -0,0 +1,44 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K+1/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <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>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K+1/gen/top.meta/same-origin/script-tag.http.html b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.meta/same-origin/script-tag.http.html
new file mode 100644
index 0000000000..5e74d39b65
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.meta/same-origin/script-tag.http.html
@@ -0,0 +1,44 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K+1/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <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>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K+1/gen/top.meta/same-origin/sharedworker-classic.http.html b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.meta/same-origin/sharedworker-classic.http.html
new file mode 100644
index 0000000000..b6d27e31b5
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.meta/same-origin/sharedworker-classic.http.html
@@ -0,0 +1,44 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K+1/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <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>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "sharedworker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for sharedworker-classic to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "sharedworker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for sharedworker-classic to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K+1/gen/top.meta/same-origin/worker-classic.http.html b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.meta/same-origin/worker-classic.http.html
new file mode 100644
index 0000000000..6090d396ee
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.meta/same-origin/worker-classic.http.html
@@ -0,0 +1,44 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K+1/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <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>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "worker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-classic to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "worker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-classic to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K+1/gen/top.meta/same-origin/worker-module.http.html b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.meta/same-origin/worker-module.http.html
new file mode 100644
index 0000000000..bbf7a82625
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.meta/same-origin/worker-module.http.html
@@ -0,0 +1,44 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K+1/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <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>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "worker-module",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-module to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "worker-module",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-module to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K+1/gen/top.meta/same-origin/xhr.http.html b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.meta/same-origin/xhr.http.html
new file mode 100644
index 0000000000..adf3a2344f
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.meta/same-origin/xhr.http.html
@@ -0,0 +1,44 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K+1/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <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>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K+1/gen/top.meta/strict-origin-when-cross-origin/a-tag.http.html b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.meta/strict-origin-when-cross-origin/a-tag.http.html
new file mode 100644
index 0000000000..a4368c4ff1
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.meta/strict-origin-when-cross-origin/a-tag.http.html
@@ -0,0 +1,34 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K+1/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <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>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "a-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for a-tag to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K+1/gen/top.meta/strict-origin-when-cross-origin/fetch.http.html b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.meta/strict-origin-when-cross-origin/fetch.http.html
new file mode 100644
index 0000000000..25e1379e0d
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.meta/strict-origin-when-cross-origin/fetch.http.html
@@ -0,0 +1,44 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K+1/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <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>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K+1/gen/top.meta/strict-origin-when-cross-origin/iframe-tag.http.html b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.meta/strict-origin-when-cross-origin/iframe-tag.http.html
new file mode 100644
index 0000000000..9079332516
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.meta/strict-origin-when-cross-origin/iframe-tag.http.html
@@ -0,0 +1,44 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K+1/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <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>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K+1/gen/top.meta/strict-origin-when-cross-origin/img-tag.http.html b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.meta/strict-origin-when-cross-origin/img-tag.http.html
new file mode 100644
index 0000000000..f61f8d67a0
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.meta/strict-origin-when-cross-origin/img-tag.http.html
@@ -0,0 +1,44 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K+1/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <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>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K+1/gen/top.meta/strict-origin-when-cross-origin/script-tag.http.html b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.meta/strict-origin-when-cross-origin/script-tag.http.html
new file mode 100644
index 0000000000..a7e72370fb
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.meta/strict-origin-when-cross-origin/script-tag.http.html
@@ -0,0 +1,44 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K+1/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <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>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K+1/gen/top.meta/strict-origin-when-cross-origin/sharedworker-classic.http.html b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.meta/strict-origin-when-cross-origin/sharedworker-classic.http.html
new file mode 100644
index 0000000000..8dc5aae9b8
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.meta/strict-origin-when-cross-origin/sharedworker-classic.http.html
@@ -0,0 +1,44 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K+1/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <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>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "sharedworker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for sharedworker-classic to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "sharedworker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for sharedworker-classic to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K+1/gen/top.meta/strict-origin-when-cross-origin/worker-classic.http.html b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.meta/strict-origin-when-cross-origin/worker-classic.http.html
new file mode 100644
index 0000000000..81f54227d1
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.meta/strict-origin-when-cross-origin/worker-classic.http.html
@@ -0,0 +1,44 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K+1/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <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>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "worker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-classic to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "worker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-classic to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K+1/gen/top.meta/strict-origin-when-cross-origin/worker-module.http.html b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.meta/strict-origin-when-cross-origin/worker-module.http.html
new file mode 100644
index 0000000000..538cf48c3a
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.meta/strict-origin-when-cross-origin/worker-module.http.html
@@ -0,0 +1,44 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K+1/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <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>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "worker-module",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-module to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "worker-module",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-module to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K+1/gen/top.meta/strict-origin-when-cross-origin/xhr.http.html b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.meta/strict-origin-when-cross-origin/xhr.http.html
new file mode 100644
index 0000000000..8dd74044c3
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.meta/strict-origin-when-cross-origin/xhr.http.html
@@ -0,0 +1,44 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K+1/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <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>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K+1/gen/top.meta/unsafe-url/a-tag.http.html b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.meta/unsafe-url/a-tag.http.html
new file mode 100644
index 0000000000..93f874f51d
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.meta/unsafe-url/a-tag.http.html
@@ -0,0 +1,64 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K+1/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <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>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "a-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for a-tag to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "a-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for a-tag to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "a-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for a-tag to same-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "a-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for a-tag to same-https origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K+1/gen/top.meta/unsafe-url/fetch.http.html b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.meta/unsafe-url/fetch.http.html
new file mode 100644
index 0000000000..73b2f57951
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.meta/unsafe-url/fetch.http.html
@@ -0,0 +1,144 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K+1/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <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>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-https origin and swap-origin redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K+1/gen/top.meta/unsafe-url/iframe-tag.http.html b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.meta/unsafe-url/iframe-tag.http.html
new file mode 100644
index 0000000000..66b331a4f5
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.meta/unsafe-url/iframe-tag.http.html
@@ -0,0 +1,144 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K+1/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <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>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-https origin and swap-origin redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K+1/gen/top.meta/unsafe-url/img-tag.http.html b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.meta/unsafe-url/img-tag.http.html
new file mode 100644
index 0000000000..9f59d065e9
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.meta/unsafe-url/img-tag.http.html
@@ -0,0 +1,144 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K+1/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <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>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-https origin and swap-origin redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K+1/gen/top.meta/unsafe-url/script-tag.http.html b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.meta/unsafe-url/script-tag.http.html
new file mode 100644
index 0000000000..d09be02124
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.meta/unsafe-url/script-tag.http.html
@@ -0,0 +1,144 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K+1/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <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>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-https origin and swap-origin redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K+1/gen/top.meta/unsafe-url/sharedworker-classic.http.html b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.meta/unsafe-url/sharedworker-classic.http.html
new file mode 100644
index 0000000000..3591e7f630
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.meta/unsafe-url/sharedworker-classic.http.html
@@ -0,0 +1,44 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K+1/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <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>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "sharedworker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for sharedworker-classic to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "sharedworker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for sharedworker-classic to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K+1/gen/top.meta/unsafe-url/worker-classic.http.html b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.meta/unsafe-url/worker-classic.http.html
new file mode 100644
index 0000000000..f7ff65bd6b
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.meta/unsafe-url/worker-classic.http.html
@@ -0,0 +1,44 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K+1/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <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>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "worker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-classic to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "worker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-classic to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K+1/gen/top.meta/unsafe-url/worker-module.http.html b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.meta/unsafe-url/worker-module.http.html
new file mode 100644
index 0000000000..48482da94f
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.meta/unsafe-url/worker-module.http.html
@@ -0,0 +1,44 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K+1/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <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>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "worker-module",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-module to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "worker-module",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-module to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K+1/gen/top.meta/unsafe-url/xhr.http.html b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.meta/unsafe-url/xhr.http.html
new file mode 100644
index 0000000000..5496264121
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.meta/unsafe-url/xhr.http.html
@@ -0,0 +1,144 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K+1/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <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>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-https origin and swap-origin redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K+1/gen/top.meta/unset/a-tag.http.html b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.meta/unset/a-tag.http.html
new file mode 100644
index 0000000000..5e2f9f5523
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.meta/unset/a-tag.http.html
@@ -0,0 +1,33 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K+1/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../../generic/test-case.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "a-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for a-tag to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K+1/gen/top.meta/unset/fetch.http.html b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.meta/unset/fetch.http.html
new file mode 100644
index 0000000000..74334b36cc
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.meta/unset/fetch.http.html
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K+1/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../../generic/test-case.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K+1/gen/top.meta/unset/iframe-tag.http.html b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.meta/unset/iframe-tag.http.html
new file mode 100644
index 0000000000..569b0ac8e2
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.meta/unset/iframe-tag.http.html
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K+1/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../../generic/test-case.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K+1/gen/top.meta/unset/img-tag.http.html b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.meta/unset/img-tag.http.html
new file mode 100644
index 0000000000..e04c767ed5
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.meta/unset/img-tag.http.html
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K+1/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../../generic/test-case.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K+1/gen/top.meta/unset/script-tag.http.html b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.meta/unset/script-tag.http.html
new file mode 100644
index 0000000000..ca1042d6a6
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.meta/unset/script-tag.http.html
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K+1/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../../generic/test-case.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K+1/gen/top.meta/unset/sharedworker-classic.http.html b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.meta/unset/sharedworker-classic.http.html
new file mode 100644
index 0000000000..6feb01bda6
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.meta/unset/sharedworker-classic.http.html
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K+1/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../../generic/test-case.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "sharedworker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for sharedworker-classic to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "sharedworker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for sharedworker-classic to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K+1/gen/top.meta/unset/worker-classic.http.html b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.meta/unset/worker-classic.http.html
new file mode 100644
index 0000000000..43642c590d
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.meta/unset/worker-classic.http.html
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K+1/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../../generic/test-case.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "worker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-classic to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "worker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-classic to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K+1/gen/top.meta/unset/worker-module.http.html b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.meta/unset/worker-module.http.html
new file mode 100644
index 0000000000..0d35924ddd
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.meta/unset/worker-module.http.html
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K+1/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../../generic/test-case.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "worker-module",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-module to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "worker-module",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-module to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K+1/gen/top.meta/unset/xhr.http.html b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.meta/unset/xhr.http.html
new file mode 100644
index 0000000000..7814f3492d
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.meta/unset/xhr.http.html
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K+1/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../../generic/test-case.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K+1/generic/test-case.sub.js b/testing/web-platform/tests/referrer-policy/4K+1/generic/test-case.sub.js
new file mode 100644
index 0000000000..b83b9b88a5
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K+1/generic/test-case.sub.js
@@ -0,0 +1,20 @@
+function TestCase(scenarios, sanityChecker) {
+ function runTest(scenario) {
+ // This check is A NOOP in release.
+ sanityChecker.checkScenario(scenario);
+
+ runLengthTest(
+ scenario,
+ 4096 + 1,
+ "origin",
+ scenario.test_description);
+ }
+
+ function runTests() {
+ for (const scenario of scenarios) {
+ runTest(scenario);
+ }
+ }
+
+ return {start: runTests};
+}
diff --git a/testing/web-platform/tests/referrer-policy/4K+1/spec.src.json b/testing/web-platform/tests/referrer-policy/4K+1/spec.src.json
new file mode 100644
index 0000000000..2b16521148
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K+1/spec.src.json
@@ -0,0 +1,52 @@
+{
+ "excluded_tests": [
+ {
+ // expectation=stripped-referrer only
+ "expansion": "*",
+ "source_scheme": "*",
+ "source_context_list": "*",
+ "redirection": "*",
+ "delivery_type": "*",
+ "delivery_value": "*",
+ "origin": "*",
+ "subresource": "*",
+ "expectation": [
+ "omitted",
+ "origin"
+ ]
+ },
+ {
+ // Only on the top context
+ "expansion": "*",
+ "source_scheme": "*",
+ "source_context_list": [
+ "req",
+ "srcdoc-inherit",
+ "srcdoc",
+ "iframe",
+ "worker-classic",
+ "worker-classic-data",
+ "worker-module",
+ "worker-module-data"
+ ],
+ "redirection": "*",
+ "delivery_type": "*",
+ "delivery_value": "*",
+ "origin": "*",
+ "subresource": "*",
+ "expectation": "*"
+ },
+ {
+ // subresources not yet tested.
+ "expansion": "*",
+ "source_scheme": "*",
+ "source_context_list": "*",
+ "redirection": "*",
+ "delivery_type": "*",
+ "delivery_value": "*",
+ "origin": "*",
+ "subresource": "sharedworker-module",
+ "expectation": "*"
+ }
+ ]
+}
diff --git a/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/no-referrer-when-downgrade/a-tag.http.html b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/no-referrer-when-downgrade/a-tag.http.html
new file mode 100644
index 0000000000..19c55517e8
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/no-referrer-when-downgrade/a-tag.http.html
@@ -0,0 +1,63 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K-1/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../../generic/test-case.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "a-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for a-tag to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "a-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for a-tag to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "a-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for a-tag to same-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "a-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for a-tag to same-https origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/no-referrer-when-downgrade/a-tag.http.html.headers b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/no-referrer-when-downgrade/a-tag.http.html.headers
new file mode 100644
index 0000000000..180358e691
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/no-referrer-when-downgrade/a-tag.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: no-referrer-when-downgrade
diff --git a/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/no-referrer-when-downgrade/fetch.http.html b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/no-referrer-when-downgrade/fetch.http.html
new file mode 100644
index 0000000000..d0cb7206f8
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/no-referrer-when-downgrade/fetch.http.html
@@ -0,0 +1,143 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K-1/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../../generic/test-case.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-https origin and swap-origin redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/no-referrer-when-downgrade/fetch.http.html.headers b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/no-referrer-when-downgrade/fetch.http.html.headers
new file mode 100644
index 0000000000..180358e691
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/no-referrer-when-downgrade/fetch.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: no-referrer-when-downgrade
diff --git a/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/no-referrer-when-downgrade/iframe-tag.http.html b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/no-referrer-when-downgrade/iframe-tag.http.html
new file mode 100644
index 0000000000..fbb87846a7
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/no-referrer-when-downgrade/iframe-tag.http.html
@@ -0,0 +1,143 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K-1/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../../generic/test-case.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-https origin and swap-origin redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/no-referrer-when-downgrade/iframe-tag.http.html.headers b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/no-referrer-when-downgrade/iframe-tag.http.html.headers
new file mode 100644
index 0000000000..180358e691
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/no-referrer-when-downgrade/iframe-tag.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: no-referrer-when-downgrade
diff --git a/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/no-referrer-when-downgrade/img-tag.http.html b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/no-referrer-when-downgrade/img-tag.http.html
new file mode 100644
index 0000000000..1433505d9a
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/no-referrer-when-downgrade/img-tag.http.html
@@ -0,0 +1,143 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K-1/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../../generic/test-case.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-https origin and swap-origin redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/no-referrer-when-downgrade/img-tag.http.html.headers b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/no-referrer-when-downgrade/img-tag.http.html.headers
new file mode 100644
index 0000000000..180358e691
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/no-referrer-when-downgrade/img-tag.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: no-referrer-when-downgrade
diff --git a/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/no-referrer-when-downgrade/script-tag.http.html b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/no-referrer-when-downgrade/script-tag.http.html
new file mode 100644
index 0000000000..0e7bad7b16
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/no-referrer-when-downgrade/script-tag.http.html
@@ -0,0 +1,143 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K-1/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../../generic/test-case.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-https origin and swap-origin redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/no-referrer-when-downgrade/script-tag.http.html.headers b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/no-referrer-when-downgrade/script-tag.http.html.headers
new file mode 100644
index 0000000000..180358e691
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/no-referrer-when-downgrade/script-tag.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: no-referrer-when-downgrade
diff --git a/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/no-referrer-when-downgrade/sharedworker-classic.http.html b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/no-referrer-when-downgrade/sharedworker-classic.http.html
new file mode 100644
index 0000000000..7365afae6f
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/no-referrer-when-downgrade/sharedworker-classic.http.html
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K-1/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../../generic/test-case.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "sharedworker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for sharedworker-classic to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "sharedworker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for sharedworker-classic to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/no-referrer-when-downgrade/sharedworker-classic.http.html.headers b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/no-referrer-when-downgrade/sharedworker-classic.http.html.headers
new file mode 100644
index 0000000000..180358e691
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/no-referrer-when-downgrade/sharedworker-classic.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: no-referrer-when-downgrade
diff --git a/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/no-referrer-when-downgrade/worker-classic.http.html b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/no-referrer-when-downgrade/worker-classic.http.html
new file mode 100644
index 0000000000..2533e15216
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/no-referrer-when-downgrade/worker-classic.http.html
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K-1/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../../generic/test-case.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "worker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-classic to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "worker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-classic to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/no-referrer-when-downgrade/worker-classic.http.html.headers b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/no-referrer-when-downgrade/worker-classic.http.html.headers
new file mode 100644
index 0000000000..180358e691
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/no-referrer-when-downgrade/worker-classic.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: no-referrer-when-downgrade
diff --git a/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/no-referrer-when-downgrade/worker-module.http.html b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/no-referrer-when-downgrade/worker-module.http.html
new file mode 100644
index 0000000000..8190dfcdd4
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/no-referrer-when-downgrade/worker-module.http.html
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K-1/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../../generic/test-case.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "worker-module",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-module to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "worker-module",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-module to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/no-referrer-when-downgrade/worker-module.http.html.headers b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/no-referrer-when-downgrade/worker-module.http.html.headers
new file mode 100644
index 0000000000..180358e691
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/no-referrer-when-downgrade/worker-module.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: no-referrer-when-downgrade
diff --git a/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/no-referrer-when-downgrade/xhr.http.html b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/no-referrer-when-downgrade/xhr.http.html
new file mode 100644
index 0000000000..81df08c87e
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/no-referrer-when-downgrade/xhr.http.html
@@ -0,0 +1,143 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K-1/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../../generic/test-case.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-https origin and swap-origin redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/no-referrer-when-downgrade/xhr.http.html.headers b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/no-referrer-when-downgrade/xhr.http.html.headers
new file mode 100644
index 0000000000..180358e691
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/no-referrer-when-downgrade/xhr.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: no-referrer-when-downgrade
diff --git a/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/origin-when-cross-origin/a-tag.http.html b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/origin-when-cross-origin/a-tag.http.html
new file mode 100644
index 0000000000..570a2505dd
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/origin-when-cross-origin/a-tag.http.html
@@ -0,0 +1,33 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K-1/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../../generic/test-case.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "a-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for a-tag to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/origin-when-cross-origin/a-tag.http.html.headers b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/origin-when-cross-origin/a-tag.http.html.headers
new file mode 100644
index 0000000000..a15ea7c65c
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/origin-when-cross-origin/a-tag.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: origin-when-cross-origin
diff --git a/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/origin-when-cross-origin/fetch.http.html b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/origin-when-cross-origin/fetch.http.html
new file mode 100644
index 0000000000..2b840d4aec
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/origin-when-cross-origin/fetch.http.html
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K-1/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../../generic/test-case.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/origin-when-cross-origin/fetch.http.html.headers b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/origin-when-cross-origin/fetch.http.html.headers
new file mode 100644
index 0000000000..a15ea7c65c
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/origin-when-cross-origin/fetch.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: origin-when-cross-origin
diff --git a/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/origin-when-cross-origin/iframe-tag.http.html b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/origin-when-cross-origin/iframe-tag.http.html
new file mode 100644
index 0000000000..cf605923b8
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/origin-when-cross-origin/iframe-tag.http.html
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K-1/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../../generic/test-case.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/origin-when-cross-origin/iframe-tag.http.html.headers b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/origin-when-cross-origin/iframe-tag.http.html.headers
new file mode 100644
index 0000000000..a15ea7c65c
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/origin-when-cross-origin/iframe-tag.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: origin-when-cross-origin
diff --git a/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/origin-when-cross-origin/img-tag.http.html b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/origin-when-cross-origin/img-tag.http.html
new file mode 100644
index 0000000000..111862a7dc
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/origin-when-cross-origin/img-tag.http.html
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K-1/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../../generic/test-case.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/origin-when-cross-origin/img-tag.http.html.headers b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/origin-when-cross-origin/img-tag.http.html.headers
new file mode 100644
index 0000000000..a15ea7c65c
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/origin-when-cross-origin/img-tag.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: origin-when-cross-origin
diff --git a/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/origin-when-cross-origin/script-tag.http.html b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/origin-when-cross-origin/script-tag.http.html
new file mode 100644
index 0000000000..abdb195140
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/origin-when-cross-origin/script-tag.http.html
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K-1/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../../generic/test-case.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/origin-when-cross-origin/script-tag.http.html.headers b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/origin-when-cross-origin/script-tag.http.html.headers
new file mode 100644
index 0000000000..a15ea7c65c
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/origin-when-cross-origin/script-tag.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: origin-when-cross-origin
diff --git a/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/origin-when-cross-origin/sharedworker-classic.http.html b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/origin-when-cross-origin/sharedworker-classic.http.html
new file mode 100644
index 0000000000..7365afae6f
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/origin-when-cross-origin/sharedworker-classic.http.html
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K-1/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../../generic/test-case.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "sharedworker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for sharedworker-classic to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "sharedworker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for sharedworker-classic to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/origin-when-cross-origin/sharedworker-classic.http.html.headers b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/origin-when-cross-origin/sharedworker-classic.http.html.headers
new file mode 100644
index 0000000000..a15ea7c65c
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/origin-when-cross-origin/sharedworker-classic.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: origin-when-cross-origin
diff --git a/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/origin-when-cross-origin/worker-classic.http.html b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/origin-when-cross-origin/worker-classic.http.html
new file mode 100644
index 0000000000..2533e15216
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/origin-when-cross-origin/worker-classic.http.html
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K-1/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../../generic/test-case.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "worker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-classic to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "worker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-classic to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/origin-when-cross-origin/worker-classic.http.html.headers b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/origin-when-cross-origin/worker-classic.http.html.headers
new file mode 100644
index 0000000000..a15ea7c65c
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/origin-when-cross-origin/worker-classic.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: origin-when-cross-origin
diff --git a/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/origin-when-cross-origin/worker-module.http.html b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/origin-when-cross-origin/worker-module.http.html
new file mode 100644
index 0000000000..8190dfcdd4
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/origin-when-cross-origin/worker-module.http.html
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K-1/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../../generic/test-case.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "worker-module",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-module to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "worker-module",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-module to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/origin-when-cross-origin/worker-module.http.html.headers b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/origin-when-cross-origin/worker-module.http.html.headers
new file mode 100644
index 0000000000..a15ea7c65c
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/origin-when-cross-origin/worker-module.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: origin-when-cross-origin
diff --git a/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/origin-when-cross-origin/xhr.http.html b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/origin-when-cross-origin/xhr.http.html
new file mode 100644
index 0000000000..b0bcb0a901
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/origin-when-cross-origin/xhr.http.html
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K-1/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../../generic/test-case.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/origin-when-cross-origin/xhr.http.html.headers b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/origin-when-cross-origin/xhr.http.html.headers
new file mode 100644
index 0000000000..a15ea7c65c
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/origin-when-cross-origin/xhr.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: origin-when-cross-origin
diff --git a/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/same-origin/a-tag.http.html b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/same-origin/a-tag.http.html
new file mode 100644
index 0000000000..570a2505dd
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/same-origin/a-tag.http.html
@@ -0,0 +1,33 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K-1/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../../generic/test-case.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "a-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for a-tag to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/same-origin/a-tag.http.html.headers b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/same-origin/a-tag.http.html.headers
new file mode 100644
index 0000000000..be66cf9321
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/same-origin/a-tag.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: same-origin
diff --git a/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/same-origin/fetch.http.html b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/same-origin/fetch.http.html
new file mode 100644
index 0000000000..2b840d4aec
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/same-origin/fetch.http.html
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K-1/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../../generic/test-case.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/same-origin/fetch.http.html.headers b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/same-origin/fetch.http.html.headers
new file mode 100644
index 0000000000..be66cf9321
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/same-origin/fetch.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: same-origin
diff --git a/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/same-origin/iframe-tag.http.html b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/same-origin/iframe-tag.http.html
new file mode 100644
index 0000000000..cf605923b8
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/same-origin/iframe-tag.http.html
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K-1/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../../generic/test-case.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/same-origin/iframe-tag.http.html.headers b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/same-origin/iframe-tag.http.html.headers
new file mode 100644
index 0000000000..be66cf9321
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/same-origin/iframe-tag.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: same-origin
diff --git a/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/same-origin/img-tag.http.html b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/same-origin/img-tag.http.html
new file mode 100644
index 0000000000..111862a7dc
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/same-origin/img-tag.http.html
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K-1/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../../generic/test-case.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/same-origin/img-tag.http.html.headers b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/same-origin/img-tag.http.html.headers
new file mode 100644
index 0000000000..be66cf9321
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/same-origin/img-tag.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: same-origin
diff --git a/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/same-origin/script-tag.http.html b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/same-origin/script-tag.http.html
new file mode 100644
index 0000000000..abdb195140
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/same-origin/script-tag.http.html
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K-1/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../../generic/test-case.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/same-origin/script-tag.http.html.headers b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/same-origin/script-tag.http.html.headers
new file mode 100644
index 0000000000..be66cf9321
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/same-origin/script-tag.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: same-origin
diff --git a/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/same-origin/sharedworker-classic.http.html b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/same-origin/sharedworker-classic.http.html
new file mode 100644
index 0000000000..7365afae6f
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/same-origin/sharedworker-classic.http.html
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K-1/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../../generic/test-case.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "sharedworker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for sharedworker-classic to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "sharedworker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for sharedworker-classic to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/same-origin/sharedworker-classic.http.html.headers b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/same-origin/sharedworker-classic.http.html.headers
new file mode 100644
index 0000000000..be66cf9321
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/same-origin/sharedworker-classic.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: same-origin
diff --git a/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/same-origin/worker-classic.http.html b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/same-origin/worker-classic.http.html
new file mode 100644
index 0000000000..2533e15216
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/same-origin/worker-classic.http.html
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K-1/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../../generic/test-case.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "worker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-classic to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "worker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-classic to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/same-origin/worker-classic.http.html.headers b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/same-origin/worker-classic.http.html.headers
new file mode 100644
index 0000000000..be66cf9321
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/same-origin/worker-classic.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: same-origin
diff --git a/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/same-origin/worker-module.http.html b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/same-origin/worker-module.http.html
new file mode 100644
index 0000000000..8190dfcdd4
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/same-origin/worker-module.http.html
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K-1/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../../generic/test-case.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "worker-module",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-module to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "worker-module",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-module to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/same-origin/worker-module.http.html.headers b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/same-origin/worker-module.http.html.headers
new file mode 100644
index 0000000000..be66cf9321
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/same-origin/worker-module.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: same-origin
diff --git a/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/same-origin/xhr.http.html b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/same-origin/xhr.http.html
new file mode 100644
index 0000000000..b0bcb0a901
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/same-origin/xhr.http.html
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K-1/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../../generic/test-case.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/same-origin/xhr.http.html.headers b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/same-origin/xhr.http.html.headers
new file mode 100644
index 0000000000..be66cf9321
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/same-origin/xhr.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: same-origin
diff --git a/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/strict-origin-when-cross-origin/a-tag.http.html b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/strict-origin-when-cross-origin/a-tag.http.html
new file mode 100644
index 0000000000..570a2505dd
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/strict-origin-when-cross-origin/a-tag.http.html
@@ -0,0 +1,33 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K-1/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../../generic/test-case.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "a-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for a-tag to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/strict-origin-when-cross-origin/a-tag.http.html.headers b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/strict-origin-when-cross-origin/a-tag.http.html.headers
new file mode 100644
index 0000000000..4cff1d12f8
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/strict-origin-when-cross-origin/a-tag.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: strict-origin-when-cross-origin
diff --git a/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/strict-origin-when-cross-origin/fetch.http.html b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/strict-origin-when-cross-origin/fetch.http.html
new file mode 100644
index 0000000000..2b840d4aec
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/strict-origin-when-cross-origin/fetch.http.html
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K-1/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../../generic/test-case.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/strict-origin-when-cross-origin/fetch.http.html.headers b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/strict-origin-when-cross-origin/fetch.http.html.headers
new file mode 100644
index 0000000000..4cff1d12f8
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/strict-origin-when-cross-origin/fetch.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: strict-origin-when-cross-origin
diff --git a/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/strict-origin-when-cross-origin/iframe-tag.http.html b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/strict-origin-when-cross-origin/iframe-tag.http.html
new file mode 100644
index 0000000000..cf605923b8
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/strict-origin-when-cross-origin/iframe-tag.http.html
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K-1/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../../generic/test-case.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/strict-origin-when-cross-origin/iframe-tag.http.html.headers b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/strict-origin-when-cross-origin/iframe-tag.http.html.headers
new file mode 100644
index 0000000000..4cff1d12f8
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/strict-origin-when-cross-origin/iframe-tag.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: strict-origin-when-cross-origin
diff --git a/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/strict-origin-when-cross-origin/img-tag.http.html b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/strict-origin-when-cross-origin/img-tag.http.html
new file mode 100644
index 0000000000..111862a7dc
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/strict-origin-when-cross-origin/img-tag.http.html
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K-1/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../../generic/test-case.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/strict-origin-when-cross-origin/img-tag.http.html.headers b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/strict-origin-when-cross-origin/img-tag.http.html.headers
new file mode 100644
index 0000000000..4cff1d12f8
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/strict-origin-when-cross-origin/img-tag.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: strict-origin-when-cross-origin
diff --git a/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/strict-origin-when-cross-origin/script-tag.http.html b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/strict-origin-when-cross-origin/script-tag.http.html
new file mode 100644
index 0000000000..abdb195140
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/strict-origin-when-cross-origin/script-tag.http.html
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K-1/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../../generic/test-case.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/strict-origin-when-cross-origin/script-tag.http.html.headers b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/strict-origin-when-cross-origin/script-tag.http.html.headers
new file mode 100644
index 0000000000..4cff1d12f8
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/strict-origin-when-cross-origin/script-tag.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: strict-origin-when-cross-origin
diff --git a/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/strict-origin-when-cross-origin/sharedworker-classic.http.html b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/strict-origin-when-cross-origin/sharedworker-classic.http.html
new file mode 100644
index 0000000000..7365afae6f
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/strict-origin-when-cross-origin/sharedworker-classic.http.html
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K-1/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../../generic/test-case.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "sharedworker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for sharedworker-classic to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "sharedworker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for sharedworker-classic to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/strict-origin-when-cross-origin/sharedworker-classic.http.html.headers b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/strict-origin-when-cross-origin/sharedworker-classic.http.html.headers
new file mode 100644
index 0000000000..4cff1d12f8
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/strict-origin-when-cross-origin/sharedworker-classic.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: strict-origin-when-cross-origin
diff --git a/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/strict-origin-when-cross-origin/worker-classic.http.html b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/strict-origin-when-cross-origin/worker-classic.http.html
new file mode 100644
index 0000000000..2533e15216
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/strict-origin-when-cross-origin/worker-classic.http.html
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K-1/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../../generic/test-case.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "worker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-classic to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "worker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-classic to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/strict-origin-when-cross-origin/worker-classic.http.html.headers b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/strict-origin-when-cross-origin/worker-classic.http.html.headers
new file mode 100644
index 0000000000..4cff1d12f8
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/strict-origin-when-cross-origin/worker-classic.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: strict-origin-when-cross-origin
diff --git a/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/strict-origin-when-cross-origin/worker-module.http.html b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/strict-origin-when-cross-origin/worker-module.http.html
new file mode 100644
index 0000000000..8190dfcdd4
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/strict-origin-when-cross-origin/worker-module.http.html
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K-1/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../../generic/test-case.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "worker-module",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-module to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "worker-module",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-module to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/strict-origin-when-cross-origin/worker-module.http.html.headers b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/strict-origin-when-cross-origin/worker-module.http.html.headers
new file mode 100644
index 0000000000..4cff1d12f8
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/strict-origin-when-cross-origin/worker-module.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: strict-origin-when-cross-origin
diff --git a/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/strict-origin-when-cross-origin/xhr.http.html b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/strict-origin-when-cross-origin/xhr.http.html
new file mode 100644
index 0000000000..b0bcb0a901
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/strict-origin-when-cross-origin/xhr.http.html
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K-1/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../../generic/test-case.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/strict-origin-when-cross-origin/xhr.http.html.headers b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/strict-origin-when-cross-origin/xhr.http.html.headers
new file mode 100644
index 0000000000..4cff1d12f8
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/strict-origin-when-cross-origin/xhr.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: strict-origin-when-cross-origin
diff --git a/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/unsafe-url/a-tag.http.html b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/unsafe-url/a-tag.http.html
new file mode 100644
index 0000000000..19c55517e8
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/unsafe-url/a-tag.http.html
@@ -0,0 +1,63 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K-1/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../../generic/test-case.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "a-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for a-tag to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "a-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for a-tag to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "a-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for a-tag to same-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "a-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for a-tag to same-https origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/unsafe-url/a-tag.http.html.headers b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/unsafe-url/a-tag.http.html.headers
new file mode 100644
index 0000000000..c1d3fd1a0b
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/unsafe-url/a-tag.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: unsafe-url
diff --git a/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/unsafe-url/fetch.http.html b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/unsafe-url/fetch.http.html
new file mode 100644
index 0000000000..d0cb7206f8
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/unsafe-url/fetch.http.html
@@ -0,0 +1,143 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K-1/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../../generic/test-case.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-https origin and swap-origin redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/unsafe-url/fetch.http.html.headers b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/unsafe-url/fetch.http.html.headers
new file mode 100644
index 0000000000..c1d3fd1a0b
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/unsafe-url/fetch.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: unsafe-url
diff --git a/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/unsafe-url/iframe-tag.http.html b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/unsafe-url/iframe-tag.http.html
new file mode 100644
index 0000000000..fbb87846a7
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/unsafe-url/iframe-tag.http.html
@@ -0,0 +1,143 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K-1/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../../generic/test-case.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-https origin and swap-origin redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/unsafe-url/iframe-tag.http.html.headers b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/unsafe-url/iframe-tag.http.html.headers
new file mode 100644
index 0000000000..c1d3fd1a0b
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/unsafe-url/iframe-tag.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: unsafe-url
diff --git a/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/unsafe-url/img-tag.http.html b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/unsafe-url/img-tag.http.html
new file mode 100644
index 0000000000..1433505d9a
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/unsafe-url/img-tag.http.html
@@ -0,0 +1,143 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K-1/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../../generic/test-case.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-https origin and swap-origin redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/unsafe-url/img-tag.http.html.headers b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/unsafe-url/img-tag.http.html.headers
new file mode 100644
index 0000000000..c1d3fd1a0b
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/unsafe-url/img-tag.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: unsafe-url
diff --git a/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/unsafe-url/script-tag.http.html b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/unsafe-url/script-tag.http.html
new file mode 100644
index 0000000000..0e7bad7b16
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/unsafe-url/script-tag.http.html
@@ -0,0 +1,143 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K-1/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../../generic/test-case.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-https origin and swap-origin redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/unsafe-url/script-tag.http.html.headers b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/unsafe-url/script-tag.http.html.headers
new file mode 100644
index 0000000000..c1d3fd1a0b
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/unsafe-url/script-tag.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: unsafe-url
diff --git a/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/unsafe-url/sharedworker-classic.http.html b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/unsafe-url/sharedworker-classic.http.html
new file mode 100644
index 0000000000..7365afae6f
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/unsafe-url/sharedworker-classic.http.html
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K-1/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../../generic/test-case.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "sharedworker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for sharedworker-classic to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "sharedworker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for sharedworker-classic to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/unsafe-url/sharedworker-classic.http.html.headers b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/unsafe-url/sharedworker-classic.http.html.headers
new file mode 100644
index 0000000000..c1d3fd1a0b
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/unsafe-url/sharedworker-classic.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: unsafe-url
diff --git a/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/unsafe-url/worker-classic.http.html b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/unsafe-url/worker-classic.http.html
new file mode 100644
index 0000000000..2533e15216
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/unsafe-url/worker-classic.http.html
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K-1/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../../generic/test-case.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "worker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-classic to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "worker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-classic to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/unsafe-url/worker-classic.http.html.headers b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/unsafe-url/worker-classic.http.html.headers
new file mode 100644
index 0000000000..c1d3fd1a0b
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/unsafe-url/worker-classic.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: unsafe-url
diff --git a/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/unsafe-url/worker-module.http.html b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/unsafe-url/worker-module.http.html
new file mode 100644
index 0000000000..8190dfcdd4
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/unsafe-url/worker-module.http.html
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K-1/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../../generic/test-case.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "worker-module",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-module to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "worker-module",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-module to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/unsafe-url/worker-module.http.html.headers b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/unsafe-url/worker-module.http.html.headers
new file mode 100644
index 0000000000..c1d3fd1a0b
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/unsafe-url/worker-module.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: unsafe-url
diff --git a/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/unsafe-url/xhr.http.html b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/unsafe-url/xhr.http.html
new file mode 100644
index 0000000000..81df08c87e
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/unsafe-url/xhr.http.html
@@ -0,0 +1,143 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K-1/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../../generic/test-case.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-https origin and swap-origin redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/unsafe-url/xhr.http.html.headers b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/unsafe-url/xhr.http.html.headers
new file mode 100644
index 0000000000..c1d3fd1a0b
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/unsafe-url/xhr.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: unsafe-url
diff --git a/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/unset/a-tag.http.html b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/unset/a-tag.http.html
new file mode 100644
index 0000000000..570a2505dd
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/unset/a-tag.http.html
@@ -0,0 +1,33 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K-1/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../../generic/test-case.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "a-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for a-tag to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/unset/fetch.http.html b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/unset/fetch.http.html
new file mode 100644
index 0000000000..2b840d4aec
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/unset/fetch.http.html
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K-1/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../../generic/test-case.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/unset/iframe-tag.http.html b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/unset/iframe-tag.http.html
new file mode 100644
index 0000000000..cf605923b8
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/unset/iframe-tag.http.html
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K-1/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../../generic/test-case.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/unset/img-tag.http.html b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/unset/img-tag.http.html
new file mode 100644
index 0000000000..111862a7dc
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/unset/img-tag.http.html
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K-1/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../../generic/test-case.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/unset/script-tag.http.html b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/unset/script-tag.http.html
new file mode 100644
index 0000000000..abdb195140
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/unset/script-tag.http.html
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K-1/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../../generic/test-case.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/unset/sharedworker-classic.http.html b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/unset/sharedworker-classic.http.html
new file mode 100644
index 0000000000..7365afae6f
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/unset/sharedworker-classic.http.html
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K-1/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../../generic/test-case.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "sharedworker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for sharedworker-classic to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "sharedworker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for sharedworker-classic to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/unset/worker-classic.http.html b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/unset/worker-classic.http.html
new file mode 100644
index 0000000000..2533e15216
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/unset/worker-classic.http.html
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K-1/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../../generic/test-case.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "worker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-classic to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "worker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-classic to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/unset/worker-module.http.html b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/unset/worker-module.http.html
new file mode 100644
index 0000000000..8190dfcdd4
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/unset/worker-module.http.html
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K-1/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../../generic/test-case.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "worker-module",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-module to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "worker-module",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-module to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/unset/xhr.http.html b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/unset/xhr.http.html
new file mode 100644
index 0000000000..b0bcb0a901
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.http-rp/unset/xhr.http.html
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K-1/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../../generic/test-case.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K-1/gen/top.meta/no-referrer-when-downgrade/a-tag.http.html b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.meta/no-referrer-when-downgrade/a-tag.http.html
new file mode 100644
index 0000000000..de2e5a9c49
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.meta/no-referrer-when-downgrade/a-tag.http.html
@@ -0,0 +1,64 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K-1/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <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>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "a-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for a-tag to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "a-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for a-tag to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "a-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for a-tag to same-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "a-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for a-tag to same-https origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K-1/gen/top.meta/no-referrer-when-downgrade/fetch.http.html b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.meta/no-referrer-when-downgrade/fetch.http.html
new file mode 100644
index 0000000000..983bdaa3bb
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.meta/no-referrer-when-downgrade/fetch.http.html
@@ -0,0 +1,144 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K-1/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <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>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-https origin and swap-origin redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K-1/gen/top.meta/no-referrer-when-downgrade/iframe-tag.http.html b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.meta/no-referrer-when-downgrade/iframe-tag.http.html
new file mode 100644
index 0000000000..7f28364d6f
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.meta/no-referrer-when-downgrade/iframe-tag.http.html
@@ -0,0 +1,144 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K-1/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <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>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-https origin and swap-origin redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K-1/gen/top.meta/no-referrer-when-downgrade/img-tag.http.html b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.meta/no-referrer-when-downgrade/img-tag.http.html
new file mode 100644
index 0000000000..2f40d7d317
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.meta/no-referrer-when-downgrade/img-tag.http.html
@@ -0,0 +1,144 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K-1/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <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>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-https origin and swap-origin redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K-1/gen/top.meta/no-referrer-when-downgrade/script-tag.http.html b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.meta/no-referrer-when-downgrade/script-tag.http.html
new file mode 100644
index 0000000000..9eb61cc176
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.meta/no-referrer-when-downgrade/script-tag.http.html
@@ -0,0 +1,144 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K-1/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <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>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-https origin and swap-origin redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K-1/gen/top.meta/no-referrer-when-downgrade/sharedworker-classic.http.html b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.meta/no-referrer-when-downgrade/sharedworker-classic.http.html
new file mode 100644
index 0000000000..e6f3c9e903
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.meta/no-referrer-when-downgrade/sharedworker-classic.http.html
@@ -0,0 +1,44 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K-1/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <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>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "sharedworker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for sharedworker-classic to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "sharedworker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for sharedworker-classic to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K-1/gen/top.meta/no-referrer-when-downgrade/worker-classic.http.html b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.meta/no-referrer-when-downgrade/worker-classic.http.html
new file mode 100644
index 0000000000..09f0484505
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.meta/no-referrer-when-downgrade/worker-classic.http.html
@@ -0,0 +1,44 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K-1/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <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>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "worker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-classic to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "worker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-classic to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K-1/gen/top.meta/no-referrer-when-downgrade/worker-module.http.html b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.meta/no-referrer-when-downgrade/worker-module.http.html
new file mode 100644
index 0000000000..115ab0898b
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.meta/no-referrer-when-downgrade/worker-module.http.html
@@ -0,0 +1,44 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K-1/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <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>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "worker-module",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-module to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "worker-module",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-module to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K-1/gen/top.meta/no-referrer-when-downgrade/xhr.http.html b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.meta/no-referrer-when-downgrade/xhr.http.html
new file mode 100644
index 0000000000..3963f27bec
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.meta/no-referrer-when-downgrade/xhr.http.html
@@ -0,0 +1,144 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K-1/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <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>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-https origin and swap-origin redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K-1/gen/top.meta/origin-when-cross-origin/a-tag.http.html b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.meta/origin-when-cross-origin/a-tag.http.html
new file mode 100644
index 0000000000..b1024a0d0d
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.meta/origin-when-cross-origin/a-tag.http.html
@@ -0,0 +1,34 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K-1/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <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>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "a-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for a-tag to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K-1/gen/top.meta/origin-when-cross-origin/fetch.http.html b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.meta/origin-when-cross-origin/fetch.http.html
new file mode 100644
index 0000000000..430840ad06
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.meta/origin-when-cross-origin/fetch.http.html
@@ -0,0 +1,44 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K-1/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <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>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K-1/gen/top.meta/origin-when-cross-origin/iframe-tag.http.html b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.meta/origin-when-cross-origin/iframe-tag.http.html
new file mode 100644
index 0000000000..46700793f0
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.meta/origin-when-cross-origin/iframe-tag.http.html
@@ -0,0 +1,44 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K-1/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <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>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K-1/gen/top.meta/origin-when-cross-origin/img-tag.http.html b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.meta/origin-when-cross-origin/img-tag.http.html
new file mode 100644
index 0000000000..7ed139aaf9
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.meta/origin-when-cross-origin/img-tag.http.html
@@ -0,0 +1,44 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K-1/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <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>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K-1/gen/top.meta/origin-when-cross-origin/script-tag.http.html b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.meta/origin-when-cross-origin/script-tag.http.html
new file mode 100644
index 0000000000..0311da88f0
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.meta/origin-when-cross-origin/script-tag.http.html
@@ -0,0 +1,44 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K-1/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <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>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K-1/gen/top.meta/origin-when-cross-origin/sharedworker-classic.http.html b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.meta/origin-when-cross-origin/sharedworker-classic.http.html
new file mode 100644
index 0000000000..3b8544271c
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.meta/origin-when-cross-origin/sharedworker-classic.http.html
@@ -0,0 +1,44 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K-1/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <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>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "sharedworker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for sharedworker-classic to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "sharedworker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for sharedworker-classic to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K-1/gen/top.meta/origin-when-cross-origin/worker-classic.http.html b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.meta/origin-when-cross-origin/worker-classic.http.html
new file mode 100644
index 0000000000..8800e866a9
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.meta/origin-when-cross-origin/worker-classic.http.html
@@ -0,0 +1,44 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K-1/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <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>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "worker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-classic to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "worker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-classic to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K-1/gen/top.meta/origin-when-cross-origin/worker-module.http.html b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.meta/origin-when-cross-origin/worker-module.http.html
new file mode 100644
index 0000000000..1352972ef1
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.meta/origin-when-cross-origin/worker-module.http.html
@@ -0,0 +1,44 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K-1/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <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>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "worker-module",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-module to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "worker-module",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-module to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K-1/gen/top.meta/origin-when-cross-origin/xhr.http.html b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.meta/origin-when-cross-origin/xhr.http.html
new file mode 100644
index 0000000000..3673e5e00e
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.meta/origin-when-cross-origin/xhr.http.html
@@ -0,0 +1,44 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K-1/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <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>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K-1/gen/top.meta/same-origin/a-tag.http.html b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.meta/same-origin/a-tag.http.html
new file mode 100644
index 0000000000..5c6c22a3ae
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.meta/same-origin/a-tag.http.html
@@ -0,0 +1,34 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K-1/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <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>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "a-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for a-tag to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K-1/gen/top.meta/same-origin/fetch.http.html b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.meta/same-origin/fetch.http.html
new file mode 100644
index 0000000000..7f3ee713ec
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.meta/same-origin/fetch.http.html
@@ -0,0 +1,44 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K-1/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <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>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K-1/gen/top.meta/same-origin/iframe-tag.http.html b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.meta/same-origin/iframe-tag.http.html
new file mode 100644
index 0000000000..abe57dfd77
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.meta/same-origin/iframe-tag.http.html
@@ -0,0 +1,44 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K-1/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <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>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K-1/gen/top.meta/same-origin/img-tag.http.html b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.meta/same-origin/img-tag.http.html
new file mode 100644
index 0000000000..5f7cf96f2a
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.meta/same-origin/img-tag.http.html
@@ -0,0 +1,44 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K-1/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <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>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K-1/gen/top.meta/same-origin/script-tag.http.html b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.meta/same-origin/script-tag.http.html
new file mode 100644
index 0000000000..aa42aa5c05
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.meta/same-origin/script-tag.http.html
@@ -0,0 +1,44 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K-1/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <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>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K-1/gen/top.meta/same-origin/sharedworker-classic.http.html b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.meta/same-origin/sharedworker-classic.http.html
new file mode 100644
index 0000000000..cb27196125
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.meta/same-origin/sharedworker-classic.http.html
@@ -0,0 +1,44 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K-1/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <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>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "sharedworker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for sharedworker-classic to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "sharedworker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for sharedworker-classic to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K-1/gen/top.meta/same-origin/worker-classic.http.html b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.meta/same-origin/worker-classic.http.html
new file mode 100644
index 0000000000..a53a4c5894
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.meta/same-origin/worker-classic.http.html
@@ -0,0 +1,44 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K-1/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <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>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "worker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-classic to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "worker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-classic to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K-1/gen/top.meta/same-origin/worker-module.http.html b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.meta/same-origin/worker-module.http.html
new file mode 100644
index 0000000000..cc23f56ac8
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.meta/same-origin/worker-module.http.html
@@ -0,0 +1,44 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K-1/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <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>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "worker-module",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-module to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "worker-module",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-module to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K-1/gen/top.meta/same-origin/xhr.http.html b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.meta/same-origin/xhr.http.html
new file mode 100644
index 0000000000..6fb95afee2
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.meta/same-origin/xhr.http.html
@@ -0,0 +1,44 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K-1/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <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>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K-1/gen/top.meta/strict-origin-when-cross-origin/a-tag.http.html b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.meta/strict-origin-when-cross-origin/a-tag.http.html
new file mode 100644
index 0000000000..52ee01f941
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.meta/strict-origin-when-cross-origin/a-tag.http.html
@@ -0,0 +1,34 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K-1/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <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>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "a-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for a-tag to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K-1/gen/top.meta/strict-origin-when-cross-origin/fetch.http.html b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.meta/strict-origin-when-cross-origin/fetch.http.html
new file mode 100644
index 0000000000..3afa172d3d
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.meta/strict-origin-when-cross-origin/fetch.http.html
@@ -0,0 +1,44 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K-1/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <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>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K-1/gen/top.meta/strict-origin-when-cross-origin/iframe-tag.http.html b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.meta/strict-origin-when-cross-origin/iframe-tag.http.html
new file mode 100644
index 0000000000..95c89d0798
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.meta/strict-origin-when-cross-origin/iframe-tag.http.html
@@ -0,0 +1,44 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K-1/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <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>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K-1/gen/top.meta/strict-origin-when-cross-origin/img-tag.http.html b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.meta/strict-origin-when-cross-origin/img-tag.http.html
new file mode 100644
index 0000000000..18758a748d
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.meta/strict-origin-when-cross-origin/img-tag.http.html
@@ -0,0 +1,44 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K-1/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <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>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K-1/gen/top.meta/strict-origin-when-cross-origin/script-tag.http.html b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.meta/strict-origin-when-cross-origin/script-tag.http.html
new file mode 100644
index 0000000000..565e5fe06b
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.meta/strict-origin-when-cross-origin/script-tag.http.html
@@ -0,0 +1,44 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K-1/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <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>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K-1/gen/top.meta/strict-origin-when-cross-origin/sharedworker-classic.http.html b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.meta/strict-origin-when-cross-origin/sharedworker-classic.http.html
new file mode 100644
index 0000000000..b6028a0a2b
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.meta/strict-origin-when-cross-origin/sharedworker-classic.http.html
@@ -0,0 +1,44 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K-1/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <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>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "sharedworker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for sharedworker-classic to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "sharedworker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for sharedworker-classic to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K-1/gen/top.meta/strict-origin-when-cross-origin/worker-classic.http.html b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.meta/strict-origin-when-cross-origin/worker-classic.http.html
new file mode 100644
index 0000000000..c2f30c1143
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.meta/strict-origin-when-cross-origin/worker-classic.http.html
@@ -0,0 +1,44 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K-1/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <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>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "worker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-classic to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "worker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-classic to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K-1/gen/top.meta/strict-origin-when-cross-origin/worker-module.http.html b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.meta/strict-origin-when-cross-origin/worker-module.http.html
new file mode 100644
index 0000000000..7799aa9b1f
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.meta/strict-origin-when-cross-origin/worker-module.http.html
@@ -0,0 +1,44 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K-1/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <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>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "worker-module",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-module to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "worker-module",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-module to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K-1/gen/top.meta/strict-origin-when-cross-origin/xhr.http.html b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.meta/strict-origin-when-cross-origin/xhr.http.html
new file mode 100644
index 0000000000..3208728054
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.meta/strict-origin-when-cross-origin/xhr.http.html
@@ -0,0 +1,44 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K-1/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <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>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K-1/gen/top.meta/unsafe-url/a-tag.http.html b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.meta/unsafe-url/a-tag.http.html
new file mode 100644
index 0000000000..a2643f12a5
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.meta/unsafe-url/a-tag.http.html
@@ -0,0 +1,64 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K-1/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <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>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "a-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for a-tag to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "a-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for a-tag to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "a-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for a-tag to same-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "a-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for a-tag to same-https origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K-1/gen/top.meta/unsafe-url/fetch.http.html b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.meta/unsafe-url/fetch.http.html
new file mode 100644
index 0000000000..3e506538da
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.meta/unsafe-url/fetch.http.html
@@ -0,0 +1,144 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K-1/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <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>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-https origin and swap-origin redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K-1/gen/top.meta/unsafe-url/iframe-tag.http.html b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.meta/unsafe-url/iframe-tag.http.html
new file mode 100644
index 0000000000..5c6f19d46a
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.meta/unsafe-url/iframe-tag.http.html
@@ -0,0 +1,144 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K-1/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <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>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-https origin and swap-origin redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K-1/gen/top.meta/unsafe-url/img-tag.http.html b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.meta/unsafe-url/img-tag.http.html
new file mode 100644
index 0000000000..d4bede06b5
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.meta/unsafe-url/img-tag.http.html
@@ -0,0 +1,144 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K-1/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <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>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-https origin and swap-origin redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K-1/gen/top.meta/unsafe-url/script-tag.http.html b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.meta/unsafe-url/script-tag.http.html
new file mode 100644
index 0000000000..94073a5f6c
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.meta/unsafe-url/script-tag.http.html
@@ -0,0 +1,144 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K-1/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <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>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-https origin and swap-origin redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K-1/gen/top.meta/unsafe-url/sharedworker-classic.http.html b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.meta/unsafe-url/sharedworker-classic.http.html
new file mode 100644
index 0000000000..b63db820d5
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.meta/unsafe-url/sharedworker-classic.http.html
@@ -0,0 +1,44 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K-1/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <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>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "sharedworker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for sharedworker-classic to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "sharedworker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for sharedworker-classic to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K-1/gen/top.meta/unsafe-url/worker-classic.http.html b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.meta/unsafe-url/worker-classic.http.html
new file mode 100644
index 0000000000..aa24d06f96
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.meta/unsafe-url/worker-classic.http.html
@@ -0,0 +1,44 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K-1/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <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>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "worker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-classic to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "worker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-classic to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K-1/gen/top.meta/unsafe-url/worker-module.http.html b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.meta/unsafe-url/worker-module.http.html
new file mode 100644
index 0000000000..95926627de
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.meta/unsafe-url/worker-module.http.html
@@ -0,0 +1,44 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K-1/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <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>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "worker-module",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-module to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "worker-module",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-module to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K-1/gen/top.meta/unsafe-url/xhr.http.html b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.meta/unsafe-url/xhr.http.html
new file mode 100644
index 0000000000..bbb43ad68e
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.meta/unsafe-url/xhr.http.html
@@ -0,0 +1,144 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K-1/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <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>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-https origin and swap-origin redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K-1/gen/top.meta/unset/a-tag.http.html b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.meta/unset/a-tag.http.html
new file mode 100644
index 0000000000..570a2505dd
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.meta/unset/a-tag.http.html
@@ -0,0 +1,33 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K-1/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../../generic/test-case.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "a-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for a-tag to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K-1/gen/top.meta/unset/fetch.http.html b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.meta/unset/fetch.http.html
new file mode 100644
index 0000000000..2b840d4aec
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.meta/unset/fetch.http.html
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K-1/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../../generic/test-case.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K-1/gen/top.meta/unset/iframe-tag.http.html b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.meta/unset/iframe-tag.http.html
new file mode 100644
index 0000000000..cf605923b8
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.meta/unset/iframe-tag.http.html
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K-1/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../../generic/test-case.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K-1/gen/top.meta/unset/img-tag.http.html b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.meta/unset/img-tag.http.html
new file mode 100644
index 0000000000..111862a7dc
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.meta/unset/img-tag.http.html
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K-1/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../../generic/test-case.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K-1/gen/top.meta/unset/script-tag.http.html b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.meta/unset/script-tag.http.html
new file mode 100644
index 0000000000..abdb195140
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.meta/unset/script-tag.http.html
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K-1/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../../generic/test-case.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K-1/gen/top.meta/unset/sharedworker-classic.http.html b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.meta/unset/sharedworker-classic.http.html
new file mode 100644
index 0000000000..7365afae6f
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.meta/unset/sharedworker-classic.http.html
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K-1/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../../generic/test-case.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "sharedworker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for sharedworker-classic to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "sharedworker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for sharedworker-classic to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K-1/gen/top.meta/unset/worker-classic.http.html b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.meta/unset/worker-classic.http.html
new file mode 100644
index 0000000000..2533e15216
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.meta/unset/worker-classic.http.html
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K-1/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../../generic/test-case.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "worker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-classic to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "worker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-classic to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K-1/gen/top.meta/unset/worker-module.http.html b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.meta/unset/worker-module.http.html
new file mode 100644
index 0000000000..8190dfcdd4
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.meta/unset/worker-module.http.html
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K-1/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../../generic/test-case.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "worker-module",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-module to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "worker-module",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-module to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K-1/gen/top.meta/unset/xhr.http.html b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.meta/unset/xhr.http.html
new file mode 100644
index 0000000000..b0bcb0a901
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K-1/gen/top.meta/unset/xhr.http.html
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K-1/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../../generic/test-case.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K-1/generic/test-case.sub.js b/testing/web-platform/tests/referrer-policy/4K-1/generic/test-case.sub.js
new file mode 100644
index 0000000000..edc96053ca
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K-1/generic/test-case.sub.js
@@ -0,0 +1,20 @@
+function TestCase(scenarios, sanityChecker) {
+ function runTest(scenario) {
+ // This check is A NOOP in release.
+ sanityChecker.checkScenario(scenario);
+
+ runLengthTest(
+ scenario,
+ 4096 - 1,
+ scenario.expectation,
+ scenario.test_description);
+ }
+
+ function runTests() {
+ for (const scenario of scenarios) {
+ runTest(scenario);
+ }
+ }
+
+ return {start: runTests};
+}
diff --git a/testing/web-platform/tests/referrer-policy/4K-1/spec.src.json b/testing/web-platform/tests/referrer-policy/4K-1/spec.src.json
new file mode 100644
index 0000000000..2b16521148
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K-1/spec.src.json
@@ -0,0 +1,52 @@
+{
+ "excluded_tests": [
+ {
+ // expectation=stripped-referrer only
+ "expansion": "*",
+ "source_scheme": "*",
+ "source_context_list": "*",
+ "redirection": "*",
+ "delivery_type": "*",
+ "delivery_value": "*",
+ "origin": "*",
+ "subresource": "*",
+ "expectation": [
+ "omitted",
+ "origin"
+ ]
+ },
+ {
+ // Only on the top context
+ "expansion": "*",
+ "source_scheme": "*",
+ "source_context_list": [
+ "req",
+ "srcdoc-inherit",
+ "srcdoc",
+ "iframe",
+ "worker-classic",
+ "worker-classic-data",
+ "worker-module",
+ "worker-module-data"
+ ],
+ "redirection": "*",
+ "delivery_type": "*",
+ "delivery_value": "*",
+ "origin": "*",
+ "subresource": "*",
+ "expectation": "*"
+ },
+ {
+ // subresources not yet tested.
+ "expansion": "*",
+ "source_scheme": "*",
+ "source_context_list": "*",
+ "redirection": "*",
+ "delivery_type": "*",
+ "delivery_value": "*",
+ "origin": "*",
+ "subresource": "sharedworker-module",
+ "expectation": "*"
+ }
+ ]
+}
diff --git a/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/no-referrer-when-downgrade/a-tag.http.html b/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/no-referrer-when-downgrade/a-tag.http.html
new file mode 100644
index 0000000000..55a4ab590e
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/no-referrer-when-downgrade/a-tag.http.html
@@ -0,0 +1,63 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../../generic/test-case.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "a-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for a-tag to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "a-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for a-tag to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "a-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for a-tag to same-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "a-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for a-tag to same-https origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/no-referrer-when-downgrade/a-tag.http.html.headers b/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/no-referrer-when-downgrade/a-tag.http.html.headers
new file mode 100644
index 0000000000..180358e691
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/no-referrer-when-downgrade/a-tag.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: no-referrer-when-downgrade
diff --git a/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/no-referrer-when-downgrade/fetch.http.html b/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/no-referrer-when-downgrade/fetch.http.html
new file mode 100644
index 0000000000..f766c2d37f
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/no-referrer-when-downgrade/fetch.http.html
@@ -0,0 +1,143 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../../generic/test-case.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-https origin and swap-origin redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/no-referrer-when-downgrade/fetch.http.html.headers b/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/no-referrer-when-downgrade/fetch.http.html.headers
new file mode 100644
index 0000000000..180358e691
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/no-referrer-when-downgrade/fetch.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: no-referrer-when-downgrade
diff --git a/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/no-referrer-when-downgrade/iframe-tag.http.html b/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/no-referrer-when-downgrade/iframe-tag.http.html
new file mode 100644
index 0000000000..213d16bf07
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/no-referrer-when-downgrade/iframe-tag.http.html
@@ -0,0 +1,143 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../../generic/test-case.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-https origin and swap-origin redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/no-referrer-when-downgrade/iframe-tag.http.html.headers b/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/no-referrer-when-downgrade/iframe-tag.http.html.headers
new file mode 100644
index 0000000000..180358e691
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/no-referrer-when-downgrade/iframe-tag.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: no-referrer-when-downgrade
diff --git a/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/no-referrer-when-downgrade/img-tag.http.html b/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/no-referrer-when-downgrade/img-tag.http.html
new file mode 100644
index 0000000000..2b3587e828
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/no-referrer-when-downgrade/img-tag.http.html
@@ -0,0 +1,143 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../../generic/test-case.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-https origin and swap-origin redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/no-referrer-when-downgrade/img-tag.http.html.headers b/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/no-referrer-when-downgrade/img-tag.http.html.headers
new file mode 100644
index 0000000000..180358e691
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/no-referrer-when-downgrade/img-tag.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: no-referrer-when-downgrade
diff --git a/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/no-referrer-when-downgrade/script-tag.http.html b/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/no-referrer-when-downgrade/script-tag.http.html
new file mode 100644
index 0000000000..888ef8183d
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/no-referrer-when-downgrade/script-tag.http.html
@@ -0,0 +1,143 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../../generic/test-case.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-https origin and swap-origin redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/no-referrer-when-downgrade/script-tag.http.html.headers b/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/no-referrer-when-downgrade/script-tag.http.html.headers
new file mode 100644
index 0000000000..180358e691
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/no-referrer-when-downgrade/script-tag.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: no-referrer-when-downgrade
diff --git a/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/no-referrer-when-downgrade/sharedworker-classic.http.html b/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/no-referrer-when-downgrade/sharedworker-classic.http.html
new file mode 100644
index 0000000000..79dee13358
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/no-referrer-when-downgrade/sharedworker-classic.http.html
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../../generic/test-case.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "sharedworker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for sharedworker-classic to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "sharedworker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for sharedworker-classic to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/no-referrer-when-downgrade/sharedworker-classic.http.html.headers b/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/no-referrer-when-downgrade/sharedworker-classic.http.html.headers
new file mode 100644
index 0000000000..180358e691
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/no-referrer-when-downgrade/sharedworker-classic.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: no-referrer-when-downgrade
diff --git a/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/no-referrer-when-downgrade/worker-classic.http.html b/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/no-referrer-when-downgrade/worker-classic.http.html
new file mode 100644
index 0000000000..ed4c29375e
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/no-referrer-when-downgrade/worker-classic.http.html
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../../generic/test-case.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "worker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-classic to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "worker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-classic to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/no-referrer-when-downgrade/worker-classic.http.html.headers b/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/no-referrer-when-downgrade/worker-classic.http.html.headers
new file mode 100644
index 0000000000..180358e691
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/no-referrer-when-downgrade/worker-classic.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: no-referrer-when-downgrade
diff --git a/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/no-referrer-when-downgrade/worker-module.http.html b/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/no-referrer-when-downgrade/worker-module.http.html
new file mode 100644
index 0000000000..12c61b4eb5
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/no-referrer-when-downgrade/worker-module.http.html
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../../generic/test-case.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "worker-module",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-module to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "worker-module",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-module to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/no-referrer-when-downgrade/worker-module.http.html.headers b/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/no-referrer-when-downgrade/worker-module.http.html.headers
new file mode 100644
index 0000000000..180358e691
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/no-referrer-when-downgrade/worker-module.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: no-referrer-when-downgrade
diff --git a/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/no-referrer-when-downgrade/xhr.http.html b/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/no-referrer-when-downgrade/xhr.http.html
new file mode 100644
index 0000000000..6b1681106a
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/no-referrer-when-downgrade/xhr.http.html
@@ -0,0 +1,143 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../../generic/test-case.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-https origin and swap-origin redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/no-referrer-when-downgrade/xhr.http.html.headers b/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/no-referrer-when-downgrade/xhr.http.html.headers
new file mode 100644
index 0000000000..180358e691
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/no-referrer-when-downgrade/xhr.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: no-referrer-when-downgrade
diff --git a/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/origin-when-cross-origin/a-tag.http.html b/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/origin-when-cross-origin/a-tag.http.html
new file mode 100644
index 0000000000..14f57e9a2a
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/origin-when-cross-origin/a-tag.http.html
@@ -0,0 +1,33 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../../generic/test-case.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "a-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for a-tag to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/origin-when-cross-origin/a-tag.http.html.headers b/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/origin-when-cross-origin/a-tag.http.html.headers
new file mode 100644
index 0000000000..a15ea7c65c
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/origin-when-cross-origin/a-tag.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: origin-when-cross-origin
diff --git a/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/origin-when-cross-origin/fetch.http.html b/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/origin-when-cross-origin/fetch.http.html
new file mode 100644
index 0000000000..f382044bad
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/origin-when-cross-origin/fetch.http.html
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../../generic/test-case.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/origin-when-cross-origin/fetch.http.html.headers b/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/origin-when-cross-origin/fetch.http.html.headers
new file mode 100644
index 0000000000..a15ea7c65c
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/origin-when-cross-origin/fetch.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: origin-when-cross-origin
diff --git a/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/origin-when-cross-origin/iframe-tag.http.html b/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/origin-when-cross-origin/iframe-tag.http.html
new file mode 100644
index 0000000000..45a6cbc98b
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/origin-when-cross-origin/iframe-tag.http.html
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../../generic/test-case.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/origin-when-cross-origin/iframe-tag.http.html.headers b/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/origin-when-cross-origin/iframe-tag.http.html.headers
new file mode 100644
index 0000000000..a15ea7c65c
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/origin-when-cross-origin/iframe-tag.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: origin-when-cross-origin
diff --git a/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/origin-when-cross-origin/img-tag.http.html b/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/origin-when-cross-origin/img-tag.http.html
new file mode 100644
index 0000000000..00f7e69b57
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/origin-when-cross-origin/img-tag.http.html
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../../generic/test-case.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/origin-when-cross-origin/img-tag.http.html.headers b/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/origin-when-cross-origin/img-tag.http.html.headers
new file mode 100644
index 0000000000..a15ea7c65c
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/origin-when-cross-origin/img-tag.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: origin-when-cross-origin
diff --git a/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/origin-when-cross-origin/script-tag.http.html b/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/origin-when-cross-origin/script-tag.http.html
new file mode 100644
index 0000000000..c498ec68fe
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/origin-when-cross-origin/script-tag.http.html
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../../generic/test-case.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/origin-when-cross-origin/script-tag.http.html.headers b/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/origin-when-cross-origin/script-tag.http.html.headers
new file mode 100644
index 0000000000..a15ea7c65c
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/origin-when-cross-origin/script-tag.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: origin-when-cross-origin
diff --git a/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/origin-when-cross-origin/sharedworker-classic.http.html b/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/origin-when-cross-origin/sharedworker-classic.http.html
new file mode 100644
index 0000000000..79dee13358
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/origin-when-cross-origin/sharedworker-classic.http.html
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../../generic/test-case.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "sharedworker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for sharedworker-classic to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "sharedworker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for sharedworker-classic to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/origin-when-cross-origin/sharedworker-classic.http.html.headers b/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/origin-when-cross-origin/sharedworker-classic.http.html.headers
new file mode 100644
index 0000000000..a15ea7c65c
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/origin-when-cross-origin/sharedworker-classic.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: origin-when-cross-origin
diff --git a/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/origin-when-cross-origin/worker-classic.http.html b/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/origin-when-cross-origin/worker-classic.http.html
new file mode 100644
index 0000000000..ed4c29375e
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/origin-when-cross-origin/worker-classic.http.html
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../../generic/test-case.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "worker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-classic to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "worker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-classic to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/origin-when-cross-origin/worker-classic.http.html.headers b/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/origin-when-cross-origin/worker-classic.http.html.headers
new file mode 100644
index 0000000000..a15ea7c65c
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/origin-when-cross-origin/worker-classic.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: origin-when-cross-origin
diff --git a/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/origin-when-cross-origin/worker-module.http.html b/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/origin-when-cross-origin/worker-module.http.html
new file mode 100644
index 0000000000..12c61b4eb5
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/origin-when-cross-origin/worker-module.http.html
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../../generic/test-case.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "worker-module",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-module to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "worker-module",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-module to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/origin-when-cross-origin/worker-module.http.html.headers b/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/origin-when-cross-origin/worker-module.http.html.headers
new file mode 100644
index 0000000000..a15ea7c65c
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/origin-when-cross-origin/worker-module.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: origin-when-cross-origin
diff --git a/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/origin-when-cross-origin/xhr.http.html b/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/origin-when-cross-origin/xhr.http.html
new file mode 100644
index 0000000000..4bbf83cbe5
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/origin-when-cross-origin/xhr.http.html
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../../generic/test-case.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/origin-when-cross-origin/xhr.http.html.headers b/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/origin-when-cross-origin/xhr.http.html.headers
new file mode 100644
index 0000000000..a15ea7c65c
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/origin-when-cross-origin/xhr.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: origin-when-cross-origin
diff --git a/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/same-origin/a-tag.http.html b/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/same-origin/a-tag.http.html
new file mode 100644
index 0000000000..14f57e9a2a
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/same-origin/a-tag.http.html
@@ -0,0 +1,33 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../../generic/test-case.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "a-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for a-tag to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/same-origin/a-tag.http.html.headers b/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/same-origin/a-tag.http.html.headers
new file mode 100644
index 0000000000..be66cf9321
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/same-origin/a-tag.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: same-origin
diff --git a/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/same-origin/fetch.http.html b/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/same-origin/fetch.http.html
new file mode 100644
index 0000000000..f382044bad
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/same-origin/fetch.http.html
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../../generic/test-case.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/same-origin/fetch.http.html.headers b/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/same-origin/fetch.http.html.headers
new file mode 100644
index 0000000000..be66cf9321
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/same-origin/fetch.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: same-origin
diff --git a/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/same-origin/iframe-tag.http.html b/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/same-origin/iframe-tag.http.html
new file mode 100644
index 0000000000..45a6cbc98b
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/same-origin/iframe-tag.http.html
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../../generic/test-case.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/same-origin/iframe-tag.http.html.headers b/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/same-origin/iframe-tag.http.html.headers
new file mode 100644
index 0000000000..be66cf9321
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/same-origin/iframe-tag.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: same-origin
diff --git a/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/same-origin/img-tag.http.html b/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/same-origin/img-tag.http.html
new file mode 100644
index 0000000000..00f7e69b57
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/same-origin/img-tag.http.html
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../../generic/test-case.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/same-origin/img-tag.http.html.headers b/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/same-origin/img-tag.http.html.headers
new file mode 100644
index 0000000000..be66cf9321
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/same-origin/img-tag.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: same-origin
diff --git a/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/same-origin/script-tag.http.html b/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/same-origin/script-tag.http.html
new file mode 100644
index 0000000000..c498ec68fe
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/same-origin/script-tag.http.html
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../../generic/test-case.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/same-origin/script-tag.http.html.headers b/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/same-origin/script-tag.http.html.headers
new file mode 100644
index 0000000000..be66cf9321
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/same-origin/script-tag.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: same-origin
diff --git a/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/same-origin/sharedworker-classic.http.html b/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/same-origin/sharedworker-classic.http.html
new file mode 100644
index 0000000000..79dee13358
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/same-origin/sharedworker-classic.http.html
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../../generic/test-case.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "sharedworker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for sharedworker-classic to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "sharedworker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for sharedworker-classic to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/same-origin/sharedworker-classic.http.html.headers b/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/same-origin/sharedworker-classic.http.html.headers
new file mode 100644
index 0000000000..be66cf9321
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/same-origin/sharedworker-classic.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: same-origin
diff --git a/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/same-origin/worker-classic.http.html b/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/same-origin/worker-classic.http.html
new file mode 100644
index 0000000000..ed4c29375e
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/same-origin/worker-classic.http.html
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../../generic/test-case.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "worker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-classic to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "worker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-classic to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/same-origin/worker-classic.http.html.headers b/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/same-origin/worker-classic.http.html.headers
new file mode 100644
index 0000000000..be66cf9321
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/same-origin/worker-classic.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: same-origin
diff --git a/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/same-origin/worker-module.http.html b/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/same-origin/worker-module.http.html
new file mode 100644
index 0000000000..12c61b4eb5
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/same-origin/worker-module.http.html
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../../generic/test-case.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "worker-module",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-module to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "worker-module",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-module to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/same-origin/worker-module.http.html.headers b/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/same-origin/worker-module.http.html.headers
new file mode 100644
index 0000000000..be66cf9321
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/same-origin/worker-module.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: same-origin
diff --git a/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/same-origin/xhr.http.html b/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/same-origin/xhr.http.html
new file mode 100644
index 0000000000..4bbf83cbe5
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/same-origin/xhr.http.html
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../../generic/test-case.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/same-origin/xhr.http.html.headers b/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/same-origin/xhr.http.html.headers
new file mode 100644
index 0000000000..be66cf9321
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/same-origin/xhr.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: same-origin
diff --git a/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/strict-origin-when-cross-origin/a-tag.http.html b/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/strict-origin-when-cross-origin/a-tag.http.html
new file mode 100644
index 0000000000..14f57e9a2a
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/strict-origin-when-cross-origin/a-tag.http.html
@@ -0,0 +1,33 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../../generic/test-case.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "a-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for a-tag to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/strict-origin-when-cross-origin/a-tag.http.html.headers b/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/strict-origin-when-cross-origin/a-tag.http.html.headers
new file mode 100644
index 0000000000..4cff1d12f8
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/strict-origin-when-cross-origin/a-tag.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: strict-origin-when-cross-origin
diff --git a/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/strict-origin-when-cross-origin/fetch.http.html b/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/strict-origin-when-cross-origin/fetch.http.html
new file mode 100644
index 0000000000..f382044bad
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/strict-origin-when-cross-origin/fetch.http.html
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../../generic/test-case.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/strict-origin-when-cross-origin/fetch.http.html.headers b/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/strict-origin-when-cross-origin/fetch.http.html.headers
new file mode 100644
index 0000000000..4cff1d12f8
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/strict-origin-when-cross-origin/fetch.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: strict-origin-when-cross-origin
diff --git a/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/strict-origin-when-cross-origin/iframe-tag.http.html b/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/strict-origin-when-cross-origin/iframe-tag.http.html
new file mode 100644
index 0000000000..45a6cbc98b
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/strict-origin-when-cross-origin/iframe-tag.http.html
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../../generic/test-case.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/strict-origin-when-cross-origin/iframe-tag.http.html.headers b/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/strict-origin-when-cross-origin/iframe-tag.http.html.headers
new file mode 100644
index 0000000000..4cff1d12f8
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/strict-origin-when-cross-origin/iframe-tag.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: strict-origin-when-cross-origin
diff --git a/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/strict-origin-when-cross-origin/img-tag.http.html b/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/strict-origin-when-cross-origin/img-tag.http.html
new file mode 100644
index 0000000000..00f7e69b57
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/strict-origin-when-cross-origin/img-tag.http.html
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../../generic/test-case.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/strict-origin-when-cross-origin/img-tag.http.html.headers b/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/strict-origin-when-cross-origin/img-tag.http.html.headers
new file mode 100644
index 0000000000..4cff1d12f8
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/strict-origin-when-cross-origin/img-tag.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: strict-origin-when-cross-origin
diff --git a/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/strict-origin-when-cross-origin/script-tag.http.html b/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/strict-origin-when-cross-origin/script-tag.http.html
new file mode 100644
index 0000000000..c498ec68fe
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/strict-origin-when-cross-origin/script-tag.http.html
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../../generic/test-case.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/strict-origin-when-cross-origin/script-tag.http.html.headers b/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/strict-origin-when-cross-origin/script-tag.http.html.headers
new file mode 100644
index 0000000000..4cff1d12f8
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/strict-origin-when-cross-origin/script-tag.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: strict-origin-when-cross-origin
diff --git a/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/strict-origin-when-cross-origin/sharedworker-classic.http.html b/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/strict-origin-when-cross-origin/sharedworker-classic.http.html
new file mode 100644
index 0000000000..79dee13358
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/strict-origin-when-cross-origin/sharedworker-classic.http.html
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../../generic/test-case.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "sharedworker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for sharedworker-classic to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "sharedworker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for sharedworker-classic to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/strict-origin-when-cross-origin/sharedworker-classic.http.html.headers b/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/strict-origin-when-cross-origin/sharedworker-classic.http.html.headers
new file mode 100644
index 0000000000..4cff1d12f8
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/strict-origin-when-cross-origin/sharedworker-classic.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: strict-origin-when-cross-origin
diff --git a/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/strict-origin-when-cross-origin/worker-classic.http.html b/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/strict-origin-when-cross-origin/worker-classic.http.html
new file mode 100644
index 0000000000..ed4c29375e
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/strict-origin-when-cross-origin/worker-classic.http.html
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../../generic/test-case.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "worker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-classic to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "worker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-classic to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/strict-origin-when-cross-origin/worker-classic.http.html.headers b/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/strict-origin-when-cross-origin/worker-classic.http.html.headers
new file mode 100644
index 0000000000..4cff1d12f8
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/strict-origin-when-cross-origin/worker-classic.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: strict-origin-when-cross-origin
diff --git a/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/strict-origin-when-cross-origin/worker-module.http.html b/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/strict-origin-when-cross-origin/worker-module.http.html
new file mode 100644
index 0000000000..12c61b4eb5
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/strict-origin-when-cross-origin/worker-module.http.html
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../../generic/test-case.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "worker-module",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-module to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "worker-module",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-module to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/strict-origin-when-cross-origin/worker-module.http.html.headers b/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/strict-origin-when-cross-origin/worker-module.http.html.headers
new file mode 100644
index 0000000000..4cff1d12f8
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/strict-origin-when-cross-origin/worker-module.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: strict-origin-when-cross-origin
diff --git a/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/strict-origin-when-cross-origin/xhr.http.html b/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/strict-origin-when-cross-origin/xhr.http.html
new file mode 100644
index 0000000000..4bbf83cbe5
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/strict-origin-when-cross-origin/xhr.http.html
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../../generic/test-case.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/strict-origin-when-cross-origin/xhr.http.html.headers b/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/strict-origin-when-cross-origin/xhr.http.html.headers
new file mode 100644
index 0000000000..4cff1d12f8
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/strict-origin-when-cross-origin/xhr.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: strict-origin-when-cross-origin
diff --git a/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/unsafe-url/a-tag.http.html b/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/unsafe-url/a-tag.http.html
new file mode 100644
index 0000000000..55a4ab590e
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/unsafe-url/a-tag.http.html
@@ -0,0 +1,63 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../../generic/test-case.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "a-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for a-tag to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "a-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for a-tag to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "a-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for a-tag to same-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "a-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for a-tag to same-https origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/unsafe-url/a-tag.http.html.headers b/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/unsafe-url/a-tag.http.html.headers
new file mode 100644
index 0000000000..c1d3fd1a0b
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/unsafe-url/a-tag.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: unsafe-url
diff --git a/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/unsafe-url/fetch.http.html b/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/unsafe-url/fetch.http.html
new file mode 100644
index 0000000000..f766c2d37f
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/unsafe-url/fetch.http.html
@@ -0,0 +1,143 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../../generic/test-case.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-https origin and swap-origin redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/unsafe-url/fetch.http.html.headers b/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/unsafe-url/fetch.http.html.headers
new file mode 100644
index 0000000000..c1d3fd1a0b
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/unsafe-url/fetch.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: unsafe-url
diff --git a/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/unsafe-url/iframe-tag.http.html b/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/unsafe-url/iframe-tag.http.html
new file mode 100644
index 0000000000..213d16bf07
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/unsafe-url/iframe-tag.http.html
@@ -0,0 +1,143 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../../generic/test-case.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-https origin and swap-origin redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/unsafe-url/iframe-tag.http.html.headers b/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/unsafe-url/iframe-tag.http.html.headers
new file mode 100644
index 0000000000..c1d3fd1a0b
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/unsafe-url/iframe-tag.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: unsafe-url
diff --git a/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/unsafe-url/img-tag.http.html b/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/unsafe-url/img-tag.http.html
new file mode 100644
index 0000000000..2b3587e828
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/unsafe-url/img-tag.http.html
@@ -0,0 +1,143 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../../generic/test-case.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-https origin and swap-origin redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/unsafe-url/img-tag.http.html.headers b/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/unsafe-url/img-tag.http.html.headers
new file mode 100644
index 0000000000..c1d3fd1a0b
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/unsafe-url/img-tag.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: unsafe-url
diff --git a/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/unsafe-url/script-tag.http.html b/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/unsafe-url/script-tag.http.html
new file mode 100644
index 0000000000..888ef8183d
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/unsafe-url/script-tag.http.html
@@ -0,0 +1,143 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../../generic/test-case.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-https origin and swap-origin redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/unsafe-url/script-tag.http.html.headers b/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/unsafe-url/script-tag.http.html.headers
new file mode 100644
index 0000000000..c1d3fd1a0b
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/unsafe-url/script-tag.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: unsafe-url
diff --git a/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/unsafe-url/sharedworker-classic.http.html b/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/unsafe-url/sharedworker-classic.http.html
new file mode 100644
index 0000000000..79dee13358
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/unsafe-url/sharedworker-classic.http.html
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../../generic/test-case.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "sharedworker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for sharedworker-classic to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "sharedworker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for sharedworker-classic to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/unsafe-url/sharedworker-classic.http.html.headers b/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/unsafe-url/sharedworker-classic.http.html.headers
new file mode 100644
index 0000000000..c1d3fd1a0b
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/unsafe-url/sharedworker-classic.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: unsafe-url
diff --git a/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/unsafe-url/worker-classic.http.html b/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/unsafe-url/worker-classic.http.html
new file mode 100644
index 0000000000..ed4c29375e
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/unsafe-url/worker-classic.http.html
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../../generic/test-case.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "worker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-classic to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "worker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-classic to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/unsafe-url/worker-classic.http.html.headers b/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/unsafe-url/worker-classic.http.html.headers
new file mode 100644
index 0000000000..c1d3fd1a0b
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/unsafe-url/worker-classic.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: unsafe-url
diff --git a/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/unsafe-url/worker-module.http.html b/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/unsafe-url/worker-module.http.html
new file mode 100644
index 0000000000..12c61b4eb5
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/unsafe-url/worker-module.http.html
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../../generic/test-case.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "worker-module",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-module to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "worker-module",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-module to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/unsafe-url/worker-module.http.html.headers b/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/unsafe-url/worker-module.http.html.headers
new file mode 100644
index 0000000000..c1d3fd1a0b
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/unsafe-url/worker-module.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: unsafe-url
diff --git a/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/unsafe-url/xhr.http.html b/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/unsafe-url/xhr.http.html
new file mode 100644
index 0000000000..6b1681106a
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/unsafe-url/xhr.http.html
@@ -0,0 +1,143 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../../generic/test-case.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-https origin and swap-origin redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/unsafe-url/xhr.http.html.headers b/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/unsafe-url/xhr.http.html.headers
new file mode 100644
index 0000000000..c1d3fd1a0b
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/unsafe-url/xhr.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: unsafe-url
diff --git a/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/unset/a-tag.http.html b/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/unset/a-tag.http.html
new file mode 100644
index 0000000000..14f57e9a2a
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/unset/a-tag.http.html
@@ -0,0 +1,33 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../../generic/test-case.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "a-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for a-tag to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/unset/fetch.http.html b/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/unset/fetch.http.html
new file mode 100644
index 0000000000..f382044bad
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/unset/fetch.http.html
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../../generic/test-case.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/unset/iframe-tag.http.html b/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/unset/iframe-tag.http.html
new file mode 100644
index 0000000000..45a6cbc98b
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/unset/iframe-tag.http.html
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../../generic/test-case.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/unset/img-tag.http.html b/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/unset/img-tag.http.html
new file mode 100644
index 0000000000..00f7e69b57
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/unset/img-tag.http.html
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../../generic/test-case.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/unset/script-tag.http.html b/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/unset/script-tag.http.html
new file mode 100644
index 0000000000..c498ec68fe
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/unset/script-tag.http.html
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../../generic/test-case.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/unset/sharedworker-classic.http.html b/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/unset/sharedworker-classic.http.html
new file mode 100644
index 0000000000..79dee13358
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/unset/sharedworker-classic.http.html
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../../generic/test-case.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "sharedworker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for sharedworker-classic to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "sharedworker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for sharedworker-classic to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/unset/worker-classic.http.html b/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/unset/worker-classic.http.html
new file mode 100644
index 0000000000..ed4c29375e
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/unset/worker-classic.http.html
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../../generic/test-case.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "worker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-classic to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "worker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-classic to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/unset/worker-module.http.html b/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/unset/worker-module.http.html
new file mode 100644
index 0000000000..12c61b4eb5
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/unset/worker-module.http.html
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../../generic/test-case.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "worker-module",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-module to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "worker-module",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-module to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/unset/xhr.http.html b/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/unset/xhr.http.html
new file mode 100644
index 0000000000..4bbf83cbe5
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K/gen/top.http-rp/unset/xhr.http.html
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../../generic/test-case.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K/gen/top.meta/no-referrer-when-downgrade/a-tag.http.html b/testing/web-platform/tests/referrer-policy/4K/gen/top.meta/no-referrer-when-downgrade/a-tag.http.html
new file mode 100644
index 0000000000..ca36f256e2
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K/gen/top.meta/no-referrer-when-downgrade/a-tag.http.html
@@ -0,0 +1,64 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K/` -->
+<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>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "a-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for a-tag to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "a-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for a-tag to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "a-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for a-tag to same-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "a-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for a-tag to same-https origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K/gen/top.meta/no-referrer-when-downgrade/fetch.http.html b/testing/web-platform/tests/referrer-policy/4K/gen/top.meta/no-referrer-when-downgrade/fetch.http.html
new file mode 100644
index 0000000000..8d7a411faa
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K/gen/top.meta/no-referrer-when-downgrade/fetch.http.html
@@ -0,0 +1,144 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K/` -->
+<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>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-https origin and swap-origin redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K/gen/top.meta/no-referrer-when-downgrade/iframe-tag.http.html b/testing/web-platform/tests/referrer-policy/4K/gen/top.meta/no-referrer-when-downgrade/iframe-tag.http.html
new file mode 100644
index 0000000000..03297e0b52
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K/gen/top.meta/no-referrer-when-downgrade/iframe-tag.http.html
@@ -0,0 +1,144 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K/` -->
+<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>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-https origin and swap-origin redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K/gen/top.meta/no-referrer-when-downgrade/img-tag.http.html b/testing/web-platform/tests/referrer-policy/4K/gen/top.meta/no-referrer-when-downgrade/img-tag.http.html
new file mode 100644
index 0000000000..f8e9a9c6e9
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K/gen/top.meta/no-referrer-when-downgrade/img-tag.http.html
@@ -0,0 +1,144 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K/` -->
+<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>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-https origin and swap-origin redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K/gen/top.meta/no-referrer-when-downgrade/script-tag.http.html b/testing/web-platform/tests/referrer-policy/4K/gen/top.meta/no-referrer-when-downgrade/script-tag.http.html
new file mode 100644
index 0000000000..1aeaea7929
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K/gen/top.meta/no-referrer-when-downgrade/script-tag.http.html
@@ -0,0 +1,144 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K/` -->
+<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>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-https origin and swap-origin redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K/gen/top.meta/no-referrer-when-downgrade/sharedworker-classic.http.html b/testing/web-platform/tests/referrer-policy/4K/gen/top.meta/no-referrer-when-downgrade/sharedworker-classic.http.html
new file mode 100644
index 0000000000..81fc3a25de
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K/gen/top.meta/no-referrer-when-downgrade/sharedworker-classic.http.html
@@ -0,0 +1,44 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K/` -->
+<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>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "sharedworker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for sharedworker-classic to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "sharedworker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for sharedworker-classic to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K/gen/top.meta/no-referrer-when-downgrade/worker-classic.http.html b/testing/web-platform/tests/referrer-policy/4K/gen/top.meta/no-referrer-when-downgrade/worker-classic.http.html
new file mode 100644
index 0000000000..382b85b219
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K/gen/top.meta/no-referrer-when-downgrade/worker-classic.http.html
@@ -0,0 +1,44 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K/` -->
+<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>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "worker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-classic to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "worker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-classic to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K/gen/top.meta/no-referrer-when-downgrade/worker-module.http.html b/testing/web-platform/tests/referrer-policy/4K/gen/top.meta/no-referrer-when-downgrade/worker-module.http.html
new file mode 100644
index 0000000000..b6d0100071
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K/gen/top.meta/no-referrer-when-downgrade/worker-module.http.html
@@ -0,0 +1,44 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K/` -->
+<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>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "worker-module",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-module to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "worker-module",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-module to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K/gen/top.meta/no-referrer-when-downgrade/xhr.http.html b/testing/web-platform/tests/referrer-policy/4K/gen/top.meta/no-referrer-when-downgrade/xhr.http.html
new file mode 100644
index 0000000000..760a3040d8
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K/gen/top.meta/no-referrer-when-downgrade/xhr.http.html
@@ -0,0 +1,144 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K/` -->
+<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>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-https origin and swap-origin redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K/gen/top.meta/origin-when-cross-origin/a-tag.http.html b/testing/web-platform/tests/referrer-policy/4K/gen/top.meta/origin-when-cross-origin/a-tag.http.html
new file mode 100644
index 0000000000..1e4b3ec0dd
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K/gen/top.meta/origin-when-cross-origin/a-tag.http.html
@@ -0,0 +1,34 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K/` -->
+<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>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "a-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for a-tag to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K/gen/top.meta/origin-when-cross-origin/fetch.http.html b/testing/web-platform/tests/referrer-policy/4K/gen/top.meta/origin-when-cross-origin/fetch.http.html
new file mode 100644
index 0000000000..56f7bbce5d
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K/gen/top.meta/origin-when-cross-origin/fetch.http.html
@@ -0,0 +1,44 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K/` -->
+<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>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K/gen/top.meta/origin-when-cross-origin/iframe-tag.http.html b/testing/web-platform/tests/referrer-policy/4K/gen/top.meta/origin-when-cross-origin/iframe-tag.http.html
new file mode 100644
index 0000000000..d7b7b1dbf4
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K/gen/top.meta/origin-when-cross-origin/iframe-tag.http.html
@@ -0,0 +1,44 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K/` -->
+<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>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K/gen/top.meta/origin-when-cross-origin/img-tag.http.html b/testing/web-platform/tests/referrer-policy/4K/gen/top.meta/origin-when-cross-origin/img-tag.http.html
new file mode 100644
index 0000000000..37f868d617
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K/gen/top.meta/origin-when-cross-origin/img-tag.http.html
@@ -0,0 +1,44 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K/` -->
+<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>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K/gen/top.meta/origin-when-cross-origin/script-tag.http.html b/testing/web-platform/tests/referrer-policy/4K/gen/top.meta/origin-when-cross-origin/script-tag.http.html
new file mode 100644
index 0000000000..cc4b7b448a
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K/gen/top.meta/origin-when-cross-origin/script-tag.http.html
@@ -0,0 +1,44 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K/` -->
+<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>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K/gen/top.meta/origin-when-cross-origin/sharedworker-classic.http.html b/testing/web-platform/tests/referrer-policy/4K/gen/top.meta/origin-when-cross-origin/sharedworker-classic.http.html
new file mode 100644
index 0000000000..3694ed7f94
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K/gen/top.meta/origin-when-cross-origin/sharedworker-classic.http.html
@@ -0,0 +1,44 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K/` -->
+<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>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "sharedworker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for sharedworker-classic to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "sharedworker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for sharedworker-classic to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K/gen/top.meta/origin-when-cross-origin/worker-classic.http.html b/testing/web-platform/tests/referrer-policy/4K/gen/top.meta/origin-when-cross-origin/worker-classic.http.html
new file mode 100644
index 0000000000..02a4792f0d
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K/gen/top.meta/origin-when-cross-origin/worker-classic.http.html
@@ -0,0 +1,44 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K/` -->
+<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>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "worker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-classic to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "worker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-classic to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K/gen/top.meta/origin-when-cross-origin/worker-module.http.html b/testing/web-platform/tests/referrer-policy/4K/gen/top.meta/origin-when-cross-origin/worker-module.http.html
new file mode 100644
index 0000000000..941efe5a25
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K/gen/top.meta/origin-when-cross-origin/worker-module.http.html
@@ -0,0 +1,44 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K/` -->
+<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>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "worker-module",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-module to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "worker-module",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-module to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K/gen/top.meta/origin-when-cross-origin/xhr.http.html b/testing/web-platform/tests/referrer-policy/4K/gen/top.meta/origin-when-cross-origin/xhr.http.html
new file mode 100644
index 0000000000..0be8f5d222
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K/gen/top.meta/origin-when-cross-origin/xhr.http.html
@@ -0,0 +1,44 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K/` -->
+<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>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K/gen/top.meta/same-origin/a-tag.http.html b/testing/web-platform/tests/referrer-policy/4K/gen/top.meta/same-origin/a-tag.http.html
new file mode 100644
index 0000000000..59e3ff67e2
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K/gen/top.meta/same-origin/a-tag.http.html
@@ -0,0 +1,34 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K/` -->
+<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>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "a-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for a-tag to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K/gen/top.meta/same-origin/fetch.http.html b/testing/web-platform/tests/referrer-policy/4K/gen/top.meta/same-origin/fetch.http.html
new file mode 100644
index 0000000000..1f245254af
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K/gen/top.meta/same-origin/fetch.http.html
@@ -0,0 +1,44 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K/` -->
+<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>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K/gen/top.meta/same-origin/iframe-tag.http.html b/testing/web-platform/tests/referrer-policy/4K/gen/top.meta/same-origin/iframe-tag.http.html
new file mode 100644
index 0000000000..76c8c95045
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K/gen/top.meta/same-origin/iframe-tag.http.html
@@ -0,0 +1,44 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K/` -->
+<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>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K/gen/top.meta/same-origin/img-tag.http.html b/testing/web-platform/tests/referrer-policy/4K/gen/top.meta/same-origin/img-tag.http.html
new file mode 100644
index 0000000000..9615a8910f
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K/gen/top.meta/same-origin/img-tag.http.html
@@ -0,0 +1,44 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K/` -->
+<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>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K/gen/top.meta/same-origin/script-tag.http.html b/testing/web-platform/tests/referrer-policy/4K/gen/top.meta/same-origin/script-tag.http.html
new file mode 100644
index 0000000000..8c27ac5730
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K/gen/top.meta/same-origin/script-tag.http.html
@@ -0,0 +1,44 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K/` -->
+<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>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K/gen/top.meta/same-origin/sharedworker-classic.http.html b/testing/web-platform/tests/referrer-policy/4K/gen/top.meta/same-origin/sharedworker-classic.http.html
new file mode 100644
index 0000000000..604a56b3aa
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K/gen/top.meta/same-origin/sharedworker-classic.http.html
@@ -0,0 +1,44 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K/` -->
+<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>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "sharedworker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for sharedworker-classic to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "sharedworker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for sharedworker-classic to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K/gen/top.meta/same-origin/worker-classic.http.html b/testing/web-platform/tests/referrer-policy/4K/gen/top.meta/same-origin/worker-classic.http.html
new file mode 100644
index 0000000000..083e588f2e
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K/gen/top.meta/same-origin/worker-classic.http.html
@@ -0,0 +1,44 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K/` -->
+<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>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "worker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-classic to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "worker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-classic to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K/gen/top.meta/same-origin/worker-module.http.html b/testing/web-platform/tests/referrer-policy/4K/gen/top.meta/same-origin/worker-module.http.html
new file mode 100644
index 0000000000..11845c01c2
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K/gen/top.meta/same-origin/worker-module.http.html
@@ -0,0 +1,44 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K/` -->
+<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>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "worker-module",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-module to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "worker-module",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-module to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K/gen/top.meta/same-origin/xhr.http.html b/testing/web-platform/tests/referrer-policy/4K/gen/top.meta/same-origin/xhr.http.html
new file mode 100644
index 0000000000..2d33eb920a
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K/gen/top.meta/same-origin/xhr.http.html
@@ -0,0 +1,44 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K/` -->
+<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>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K/gen/top.meta/strict-origin-when-cross-origin/a-tag.http.html b/testing/web-platform/tests/referrer-policy/4K/gen/top.meta/strict-origin-when-cross-origin/a-tag.http.html
new file mode 100644
index 0000000000..91b567bd46
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K/gen/top.meta/strict-origin-when-cross-origin/a-tag.http.html
@@ -0,0 +1,34 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K/` -->
+<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>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "a-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for a-tag to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K/gen/top.meta/strict-origin-when-cross-origin/fetch.http.html b/testing/web-platform/tests/referrer-policy/4K/gen/top.meta/strict-origin-when-cross-origin/fetch.http.html
new file mode 100644
index 0000000000..57932b2a5d
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K/gen/top.meta/strict-origin-when-cross-origin/fetch.http.html
@@ -0,0 +1,44 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K/` -->
+<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>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K/gen/top.meta/strict-origin-when-cross-origin/iframe-tag.http.html b/testing/web-platform/tests/referrer-policy/4K/gen/top.meta/strict-origin-when-cross-origin/iframe-tag.http.html
new file mode 100644
index 0000000000..09498d2ce0
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K/gen/top.meta/strict-origin-when-cross-origin/iframe-tag.http.html
@@ -0,0 +1,44 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K/` -->
+<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>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K/gen/top.meta/strict-origin-when-cross-origin/img-tag.http.html b/testing/web-platform/tests/referrer-policy/4K/gen/top.meta/strict-origin-when-cross-origin/img-tag.http.html
new file mode 100644
index 0000000000..aba97cbd2f
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K/gen/top.meta/strict-origin-when-cross-origin/img-tag.http.html
@@ -0,0 +1,44 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K/` -->
+<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>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K/gen/top.meta/strict-origin-when-cross-origin/script-tag.http.html b/testing/web-platform/tests/referrer-policy/4K/gen/top.meta/strict-origin-when-cross-origin/script-tag.http.html
new file mode 100644
index 0000000000..d37fc4a77d
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K/gen/top.meta/strict-origin-when-cross-origin/script-tag.http.html
@@ -0,0 +1,44 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K/` -->
+<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>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K/gen/top.meta/strict-origin-when-cross-origin/sharedworker-classic.http.html b/testing/web-platform/tests/referrer-policy/4K/gen/top.meta/strict-origin-when-cross-origin/sharedworker-classic.http.html
new file mode 100644
index 0000000000..35802ee10d
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K/gen/top.meta/strict-origin-when-cross-origin/sharedworker-classic.http.html
@@ -0,0 +1,44 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K/` -->
+<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>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "sharedworker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for sharedworker-classic to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "sharedworker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for sharedworker-classic to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K/gen/top.meta/strict-origin-when-cross-origin/worker-classic.http.html b/testing/web-platform/tests/referrer-policy/4K/gen/top.meta/strict-origin-when-cross-origin/worker-classic.http.html
new file mode 100644
index 0000000000..c3b1a96459
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K/gen/top.meta/strict-origin-when-cross-origin/worker-classic.http.html
@@ -0,0 +1,44 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K/` -->
+<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>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "worker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-classic to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "worker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-classic to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K/gen/top.meta/strict-origin-when-cross-origin/worker-module.http.html b/testing/web-platform/tests/referrer-policy/4K/gen/top.meta/strict-origin-when-cross-origin/worker-module.http.html
new file mode 100644
index 0000000000..1d634c16df
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K/gen/top.meta/strict-origin-when-cross-origin/worker-module.http.html
@@ -0,0 +1,44 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K/` -->
+<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>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "worker-module",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-module to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "worker-module",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-module to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K/gen/top.meta/strict-origin-when-cross-origin/xhr.http.html b/testing/web-platform/tests/referrer-policy/4K/gen/top.meta/strict-origin-when-cross-origin/xhr.http.html
new file mode 100644
index 0000000000..24b1c70895
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K/gen/top.meta/strict-origin-when-cross-origin/xhr.http.html
@@ -0,0 +1,44 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K/` -->
+<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>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K/gen/top.meta/unsafe-url/a-tag.http.html b/testing/web-platform/tests/referrer-policy/4K/gen/top.meta/unsafe-url/a-tag.http.html
new file mode 100644
index 0000000000..0206ccc83c
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K/gen/top.meta/unsafe-url/a-tag.http.html
@@ -0,0 +1,64 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K/` -->
+<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>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "a-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for a-tag to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "a-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for a-tag to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "a-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for a-tag to same-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "a-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for a-tag to same-https origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K/gen/top.meta/unsafe-url/fetch.http.html b/testing/web-platform/tests/referrer-policy/4K/gen/top.meta/unsafe-url/fetch.http.html
new file mode 100644
index 0000000000..3f4d829ea5
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K/gen/top.meta/unsafe-url/fetch.http.html
@@ -0,0 +1,144 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K/` -->
+<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>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-https origin and swap-origin redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K/gen/top.meta/unsafe-url/iframe-tag.http.html b/testing/web-platform/tests/referrer-policy/4K/gen/top.meta/unsafe-url/iframe-tag.http.html
new file mode 100644
index 0000000000..6375f350ad
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K/gen/top.meta/unsafe-url/iframe-tag.http.html
@@ -0,0 +1,144 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K/` -->
+<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>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-https origin and swap-origin redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K/gen/top.meta/unsafe-url/img-tag.http.html b/testing/web-platform/tests/referrer-policy/4K/gen/top.meta/unsafe-url/img-tag.http.html
new file mode 100644
index 0000000000..09dc074ff7
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K/gen/top.meta/unsafe-url/img-tag.http.html
@@ -0,0 +1,144 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K/` -->
+<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>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-https origin and swap-origin redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K/gen/top.meta/unsafe-url/script-tag.http.html b/testing/web-platform/tests/referrer-policy/4K/gen/top.meta/unsafe-url/script-tag.http.html
new file mode 100644
index 0000000000..5b9cff8a4f
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K/gen/top.meta/unsafe-url/script-tag.http.html
@@ -0,0 +1,144 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K/` -->
+<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>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-https origin and swap-origin redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K/gen/top.meta/unsafe-url/sharedworker-classic.http.html b/testing/web-platform/tests/referrer-policy/4K/gen/top.meta/unsafe-url/sharedworker-classic.http.html
new file mode 100644
index 0000000000..a557f9ba4c
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K/gen/top.meta/unsafe-url/sharedworker-classic.http.html
@@ -0,0 +1,44 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K/` -->
+<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>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "sharedworker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for sharedworker-classic to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "sharedworker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for sharedworker-classic to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K/gen/top.meta/unsafe-url/worker-classic.http.html b/testing/web-platform/tests/referrer-policy/4K/gen/top.meta/unsafe-url/worker-classic.http.html
new file mode 100644
index 0000000000..9a1084e625
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K/gen/top.meta/unsafe-url/worker-classic.http.html
@@ -0,0 +1,44 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K/` -->
+<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>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "worker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-classic to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "worker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-classic to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K/gen/top.meta/unsafe-url/worker-module.http.html b/testing/web-platform/tests/referrer-policy/4K/gen/top.meta/unsafe-url/worker-module.http.html
new file mode 100644
index 0000000000..d9559312ac
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K/gen/top.meta/unsafe-url/worker-module.http.html
@@ -0,0 +1,44 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K/` -->
+<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>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "worker-module",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-module to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "worker-module",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-module to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K/gen/top.meta/unsafe-url/xhr.http.html b/testing/web-platform/tests/referrer-policy/4K/gen/top.meta/unsafe-url/xhr.http.html
new file mode 100644
index 0000000000..eec1fe65e7
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K/gen/top.meta/unsafe-url/xhr.http.html
@@ -0,0 +1,144 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K/` -->
+<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>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-https origin and swap-origin redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K/gen/top.meta/unset/a-tag.http.html b/testing/web-platform/tests/referrer-policy/4K/gen/top.meta/unset/a-tag.http.html
new file mode 100644
index 0000000000..14f57e9a2a
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K/gen/top.meta/unset/a-tag.http.html
@@ -0,0 +1,33 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../../generic/test-case.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "a-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for a-tag to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K/gen/top.meta/unset/fetch.http.html b/testing/web-platform/tests/referrer-policy/4K/gen/top.meta/unset/fetch.http.html
new file mode 100644
index 0000000000..f382044bad
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K/gen/top.meta/unset/fetch.http.html
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../../generic/test-case.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K/gen/top.meta/unset/iframe-tag.http.html b/testing/web-platform/tests/referrer-policy/4K/gen/top.meta/unset/iframe-tag.http.html
new file mode 100644
index 0000000000..45a6cbc98b
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K/gen/top.meta/unset/iframe-tag.http.html
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../../generic/test-case.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K/gen/top.meta/unset/img-tag.http.html b/testing/web-platform/tests/referrer-policy/4K/gen/top.meta/unset/img-tag.http.html
new file mode 100644
index 0000000000..00f7e69b57
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K/gen/top.meta/unset/img-tag.http.html
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../../generic/test-case.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K/gen/top.meta/unset/script-tag.http.html b/testing/web-platform/tests/referrer-policy/4K/gen/top.meta/unset/script-tag.http.html
new file mode 100644
index 0000000000..c498ec68fe
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K/gen/top.meta/unset/script-tag.http.html
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../../generic/test-case.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K/gen/top.meta/unset/sharedworker-classic.http.html b/testing/web-platform/tests/referrer-policy/4K/gen/top.meta/unset/sharedworker-classic.http.html
new file mode 100644
index 0000000000..79dee13358
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K/gen/top.meta/unset/sharedworker-classic.http.html
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../../generic/test-case.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "sharedworker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for sharedworker-classic to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "sharedworker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for sharedworker-classic to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K/gen/top.meta/unset/worker-classic.http.html b/testing/web-platform/tests/referrer-policy/4K/gen/top.meta/unset/worker-classic.http.html
new file mode 100644
index 0000000000..ed4c29375e
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K/gen/top.meta/unset/worker-classic.http.html
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../../generic/test-case.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "worker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-classic to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "worker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-classic to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K/gen/top.meta/unset/worker-module.http.html b/testing/web-platform/tests/referrer-policy/4K/gen/top.meta/unset/worker-module.http.html
new file mode 100644
index 0000000000..12c61b4eb5
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K/gen/top.meta/unset/worker-module.http.html
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../../generic/test-case.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "worker-module",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-module to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "worker-module",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-module to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K/gen/top.meta/unset/xhr.http.html b/testing/web-platform/tests/referrer-policy/4K/gen/top.meta/unset/xhr.http.html
new file mode 100644
index 0000000000..4bbf83cbe5
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K/gen/top.meta/unset/xhr.http.html
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../../generic/test-case.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K/generic/test-case.sub.js b/testing/web-platform/tests/referrer-policy/4K/generic/test-case.sub.js
new file mode 100644
index 0000000000..37d9ff2926
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K/generic/test-case.sub.js
@@ -0,0 +1,20 @@
+function TestCase(scenarios, sanityChecker) {
+ function runTest(scenario) {
+ // This check is A NOOP in release.
+ sanityChecker.checkScenario(scenario);
+
+ runLengthTest(
+ scenario,
+ 4096,
+ scenario.expectation,
+ scenario.test_description);
+ }
+
+ function runTests() {
+ for (const scenario of scenarios) {
+ runTest(scenario);
+ }
+ }
+
+ return {start: runTests};
+}
diff --git a/testing/web-platform/tests/referrer-policy/4K/spec.src.json b/testing/web-platform/tests/referrer-policy/4K/spec.src.json
new file mode 100644
index 0000000000..2b16521148
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K/spec.src.json
@@ -0,0 +1,52 @@
+{
+ "excluded_tests": [
+ {
+ // expectation=stripped-referrer only
+ "expansion": "*",
+ "source_scheme": "*",
+ "source_context_list": "*",
+ "redirection": "*",
+ "delivery_type": "*",
+ "delivery_value": "*",
+ "origin": "*",
+ "subresource": "*",
+ "expectation": [
+ "omitted",
+ "origin"
+ ]
+ },
+ {
+ // Only on the top context
+ "expansion": "*",
+ "source_scheme": "*",
+ "source_context_list": [
+ "req",
+ "srcdoc-inherit",
+ "srcdoc",
+ "iframe",
+ "worker-classic",
+ "worker-classic-data",
+ "worker-module",
+ "worker-module-data"
+ ],
+ "redirection": "*",
+ "delivery_type": "*",
+ "delivery_value": "*",
+ "origin": "*",
+ "subresource": "*",
+ "expectation": "*"
+ },
+ {
+ // subresources not yet tested.
+ "expansion": "*",
+ "source_scheme": "*",
+ "source_context_list": "*",
+ "redirection": "*",
+ "delivery_type": "*",
+ "delivery_value": "*",
+ "origin": "*",
+ "subresource": "sharedworker-module",
+ "expectation": "*"
+ }
+ ]
+}
diff --git a/testing/web-platform/tests/referrer-policy/META.yml b/testing/web-platform/tests/referrer-policy/META.yml
new file mode 100644
index 0000000000..8ead043aad
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/META.yml
@@ -0,0 +1,3 @@
+spec: https://w3c.github.io/webappsec-referrer-policy/
+suggested_reviewers:
+ - domfarolino
diff --git a/testing/web-platform/tests/referrer-policy/README.md b/testing/web-platform/tests/referrer-policy/README.md
new file mode 100644
index 0000000000..4d6eda9725
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/README.md
@@ -0,0 +1,6 @@
+# Referrer Policy Test Suite
+
+The Referrer-Policy tests are designed for testing browser implementations and conformance to the [W3 Referrer-Policy Specification](http://w3c.github.io/webappsec/specs/referrer-policy/).
+
+The subdirectory `gen/` is generated using the generator at `common/security-features`.
+See [common/security-features/README.md](../common/security-features/README.md) for how to generate tests.
diff --git a/testing/web-platform/tests/referrer-policy/css-integration/README.md b/testing/web-platform/tests/referrer-policy/css-integration/README.md
new file mode 100644
index 0000000000..150b0e6526
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/css-integration/README.md
@@ -0,0 +1,14 @@
+These tests exercise different ways to fetch a resource (image, font-face, svg
+references), generated via the sub-resource python script in
+```./generic/subresource/``` (for example, loading an image:
+```/common/security-features/subresource/image.py?id=<UUID>```) and later verify
+the headers used to fetch the resource.
+
+Since there is no way to wait for a resource referenced from CSS to be loaded,
+all tests use ```step_timeout()``` to delay the verification step until
+after the resource (hopefully) was loaded.
+
+Since there is also no way to retrieve headers (or other information) from
+resources loaded via CSS, we store the headers with the given ```UUID``` as key
+on the server, and retrieve them later via an XHR, for example:
+```/common/security-features/subresource/image.py?id=<UUID>&report-headers```.
diff --git a/testing/web-platform/tests/referrer-policy/css-integration/child-css/external-import-stylesheet.html b/testing/web-platform/tests/referrer-policy/css-integration/child-css/external-import-stylesheet.html
new file mode 100644
index 0000000000..a4bbddb564
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/css-integration/child-css/external-import-stylesheet.html
@@ -0,0 +1,46 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <title>CSS integration - Child css from external stylesheet</title>
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/utils.js"></script>
+ <!-- Common global functions for referrer-policy tests. -->
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <meta name="referrer" content="origin">
+ </head>
+ <body>
+ <p>Check that child css are loaded with the referrer and referrer policy
+ from the external stylesheet.</p>
+
+ <div class="styled"></div>
+
+ <script>
+ promise_test(function(css_test) {
+ let id = token();
+ let url_prefix = location.protocol + "//www1." + location.hostname + ":" + location.port;
+ let css_url = url_prefix +
+ "/common/security-features/subresource/stylesheet.py?id=" + id +
+ "&import-rule" + "&referrer-policy=no-referrer";
+ let check_url = url_prefix + "/common/security-features/subresource/stylesheet.py" +
+ "?id=" + id + "&report-headers";
+
+ return new Promise(resolve => {
+ let link = document.createElement("link");
+ link.href = css_url;
+ link.rel = "stylesheet";
+ link.onload = resolve;
+ document.head.appendChild(link);
+ })
+ .then(() => timeoutPromise(css_test, 1000))
+ .then(() => requestViaXhr(check_url))
+ .then(function(message) {
+ assert_own_property(message, "headers");
+ assert_equals(message.referrer, undefined);
+ });
+ }, "Child css from external stylesheet.");
+ </script>
+
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/css-integration/child-css/internal-import-stylesheet-with-differentorigin-base-url-from-preload.tentative.html b/testing/web-platform/tests/referrer-policy/css-integration/child-css/internal-import-stylesheet-with-differentorigin-base-url-from-preload.tentative.html
new file mode 100644
index 0000000000..4d2228c9a3
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/css-integration/child-css/internal-import-stylesheet-with-differentorigin-base-url-from-preload.tentative.html
@@ -0,0 +1,47 @@
+<!DOCTYPE html>
+<title>CSS integration - child CSS fetch from inline stylesheet</title>
+<link rel="help" href="https://crbug.com/1158645" />
+
+<head>
+ <meta name="referrer" content="origin">
+</head>
+
+<body>
+
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/utils.js"></script>
+ <!-- Common global functions for referrer-policy tests. -->
+ <script src="/common/security-features/resources/common.sub.js"></script>
+
+ <script>
+ promise_test(function (css_test) {
+ let id = token();
+ let url_prefix = location.protocol + "//www." + location.hostname +
+ ":" + location.port;
+ let css_url = url_prefix +
+ "/common/security-features/subresource/stylesheet.py?id=" + id +
+ "&type=stylesheet-only";
+ let check_url = url_prefix +
+ "/common/security-features/subresource/stylesheet.py" +
+ "?id=" + id + "&report-headers";
+
+ const frame = document.createElement('iframe');
+ const contents = `
+ <base href="http://other-site.example" />
+ <style type=text/css>
+ @import url('${css_url}');
+ </style>`;
+ frame.srcdoc = contents;
+ document.body.appendChild(frame);
+ return timeoutPromise(css_test, 1000)
+ .then(() => requestViaXhr(check_url))
+ .then(function (message) {
+ assert_own_property(message, "headers");
+ assert_own_property(message, "referrer");
+ assert_equals(message.referrer, location.origin + "/");
+ });
+ }, "A child stylesheet from inline style should use the document's" +
+ " URL, not the document's base URL, as its referrer, even when the " +
+ "HTML parser preloads the stylesheet.");
+ </script>
diff --git a/testing/web-platform/tests/referrer-policy/css-integration/child-css/internal-import-stylesheet-with-differentorigin-base-url.tentative.html b/testing/web-platform/tests/referrer-policy/css-integration/child-css/internal-import-stylesheet-with-differentorigin-base-url.tentative.html
new file mode 100644
index 0000000000..7130e2a14a
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/css-integration/child-css/internal-import-stylesheet-with-differentorigin-base-url.tentative.html
@@ -0,0 +1,47 @@
+<!DOCTYPE html>
+<title>CSS integration - Child css from internal stylesheet</title>
+<link rel="help" href="https://crbug.com/1158645" />
+
+<head>
+ <meta name="referrer" content="origin">
+</head>
+
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/common/utils.js"></script>
+<!-- Common global functions for referrer-policy tests. -->
+<script src="/common/security-features/resources/common.sub.js"></script>
+
+<!-- This has to follow the <script> tags, or it will make the .js files
+fail to load. -->
+<base href="http://other-site.example" />
+
+<script>
+ promise_test(function (css_test) {
+ let id = token();
+ let url_prefix = location.protocol + "//www1." + location.hostname +
+ ":" + location.port;
+ let css_url = url_prefix +
+ "/common/security-features/subresource/stylesheet.py?id=" + id +
+ "&stylesheet-only";
+ let check_url = url_prefix +
+ "/common/security-features/subresource/stylesheet.py" +
+ "?id=" + id + "&report-headers";
+
+ let style = document.createElement("style");
+ style.type = 'text/css';
+ style.appendChild(document.createTextNode("@import url('" + css_url +
+ "');"));
+ document.head.appendChild(style);
+ return timeoutPromise(css_test, 1000)
+ .then(() => requestViaXhr(check_url))
+ .then(function (message) {
+ assert_own_property(message, "headers");
+ assert_own_property(message, "referrer");
+ assert_equals(message.referrer, location.origin + "/");
+ });
+ },
+ "A child stylesheet from inline style should use the document's URL, not " +
+ "the document's base URL, as its referrer."
+ );
+</script>
diff --git a/testing/web-platform/tests/referrer-policy/css-integration/child-css/internal-import-stylesheet.html b/testing/web-platform/tests/referrer-policy/css-integration/child-css/internal-import-stylesheet.html
new file mode 100644
index 0000000000..32adf5adca
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/css-integration/child-css/internal-import-stylesheet.html
@@ -0,0 +1,42 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <title>CSS integration - Child css from internal stylesheet</title>
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/utils.js"></script>
+ <!-- Common global functions for referrer-policy tests. -->
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <meta name="referrer" content="never">
+ </head>
+ <body>
+ <p>Check that child css are loaded with the referrer and referrer policy
+ from the internal stylesheet.</p>
+
+ <div class="styled"></div>
+
+ <script>
+ promise_test(function(css_test) {
+ let id = token();
+ let url_prefix = location.protocol + "//www1." + location.hostname + ":" + location.port;
+ let css_url = url_prefix + "/common/security-features/subresource/stylesheet.py?id=" + id + "&import-rule";
+ let check_url = url_prefix + "/common/security-features/subresource/stylesheet.py" +
+ "?id=" + id + "&report-headers";
+
+ let style = document.createElement("style");
+ style.type = 'text/css';
+ style.appendChild(document.createTextNode("@import url('" + css_url + "');"));
+ document.head.appendChild(style);
+ return timeoutPromise(css_test, 1000)
+ .then(() => requestViaXhr(check_url))
+ .then(function(message) {
+ assert_own_property(message, "headers");
+ assert_own_property(message, "referrer");
+ assert_equals(message.referrer, css_url);
+ });
+ }, "Child css from internal stylesheet.");
+ </script>
+
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/css-integration/child-css/processing-instruction.html b/testing/web-platform/tests/referrer-policy/css-integration/child-css/processing-instruction.html
new file mode 100644
index 0000000000..56db82c1d3
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/css-integration/child-css/processing-instruction.html
@@ -0,0 +1,44 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <title>CSS integration - child css via a ProcessingInstruction</title>
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/utils.js"></script>
+ <!-- Common global functions for referrer-policy tests. -->
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <meta name="referrer" content="origin">
+ </head>
+ <body>
+ <p>Check that child css are loaded with the referrer and referrer policy the
+ external stylesheet(referenced from a ProcessingInstruction).</p>
+ <div class="styled"></div>
+
+ <script>
+ promise_test(function(css_test) {
+ let id = token();
+ let url_prefix = location.protocol + "//www1." + location.hostname + ":" +
+ location.port +
+ "/common/security-features/subresource/stylesheet.py?id=" +
+ id;
+ let css_url = url_prefix + "&amp;import-rule";
+ let expected = url_prefix + "&import-rule";
+ let check_url = url_prefix + "&report-headers";
+
+ let processingInstruction =
+ document.createProcessingInstruction(
+ "xml-stylesheet", "href=\"" +css_url + "\" type=\"text/css\"");
+ document.insertBefore(processingInstruction, document.firstChild);
+ return timeoutPromise(css_test, 1000)
+ .then(() => requestViaXhr(check_url))
+ .then(function(message) {
+ assert_own_property(message, "headers");
+ assert_own_property(message, "referrer");
+ assert_equals(message.referrer, expected);
+ });
+ }, "Child css via a ProcessingInstruction.");
+ </script>
+
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/css-integration/css-test-helper.js b/testing/web-platform/tests/referrer-policy/css-integration/css-test-helper.js
new file mode 100644
index 0000000000..dc97ccc063
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/css-integration/css-test-helper.js
@@ -0,0 +1,55 @@
+var svg_ns = "http://www.w3.org/2000/svg";
+var url_prefix = location.protocol + "//" + location.hostname + ":" +
+ location.port + "/common/security-features/subresource/";
+
+var svg_test_properties = [
+ 'fill',
+ 'stroke',
+ 'filter',
+ 'clip-path',
+ 'marker-start',
+ 'marker-mid',
+ 'marker-end',
+ 'mask',
+ 'mask-image',
+];
+
+// Parameters:
+// testProperties: An array of test properties.
+// testDescription: A test description
+// testFunction: A function call which sets up the expect result and runs
+// the actual test
+function runSvgTests(testProperties, testDescription, testFunction) {
+ for (const property of testProperties) {
+ let current = {
+ id: token(),
+ property: property,
+ };
+
+ promise_test(t => {
+ testFunction(current);
+ return timeoutPromise(t, 800)
+ .then(() => {
+ let check_url = url_prefix + "svg.py" + "?id=" + current.id +
+ "&report-headers";
+ return requestViaFetch(check_url);
+ })
+ .then(message => {
+ assert_own_property(message, "headers");
+ assert_own_property(message, "referrer");
+ assert_equals(message.referrer, current.expected);
+ });
+ },
+ testDescription + " " + property);
+ }
+}
+
+function createSvg() {
+ let svg = document.createElementNS(svg_ns, 'svg');
+ svg.setAttribute('width', '400');
+ svg.setAttribute('height', '400');
+ let path = document.createElementNS(svg_ns, 'path');
+ path.setAttribute('d', 'M 50,5 95,100 5,100 z');
+ svg.appendChild(path);
+ return svg;
+}
diff --git a/testing/web-platform/tests/referrer-policy/css-integration/font-face/external-import-stylesheet.html b/testing/web-platform/tests/referrer-policy/css-integration/font-face/external-import-stylesheet.html
new file mode 100644
index 0000000000..ac26aa2828
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/css-integration/font-face/external-import-stylesheet.html
@@ -0,0 +1,51 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <title>CSS integration - Font from imported stylesheet (external)</title>
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/utils.js"></script>
+ <!-- Common global functions for referrer-policy tests. -->
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <meta name="referrer" content="never">
+ </head>
+ <body>
+ <p>Check that resources from imported stylesheets (loaded from external
+ stylesheets) are loaded with the referrer and referrer policy from the
+ external stylesheet.</p>
+
+ <div class="styled"></div>
+
+ <script>
+ promise_test(function(css_test) {
+ let id = token();
+ let css_url = location.protocol + "//www1." + location.hostname + ":" +
+ location.port +
+ "/common/security-features/subresource/stylesheet.py?id=" + id +
+ "&import-rule" + "&type=font";
+ let url_prefix = location.protocol + "//" + location.hostname + ":" + location.port;
+ let css_referrer = url_prefix +
+ "/common/security-features/subresource/stylesheet.py?id=" + id + "&type=font";
+ let font_url = url_prefix + "/common/security-features/subresource/font.py" +
+ "?id=" + id + "&report-headers" + "&type=font";
+
+ return new Promise(resolve => {
+ let link = document.createElement("link");
+ link.href = css_url;
+ link.rel = "stylesheet";
+ link.onload = resolve;
+ document.head.appendChild(link);
+ })
+ .then(() => timeoutPromise(css_test, 1000))
+ .then(() => requestViaXhr(font_url))
+ .then(function(message) {
+ assert_own_property(message, "headers");
+ assert_own_property(message, "referrer");
+ assert_equals(message.referrer, css_referrer);
+ });
+ }, "Font from imported stylesheet (external).");
+ </script>
+
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/css-integration/font-face/external-stylesheet.html b/testing/web-platform/tests/referrer-policy/css-integration/font-face/external-stylesheet.html
new file mode 100644
index 0000000000..fa21a1d53f
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/css-integration/font-face/external-stylesheet.html
@@ -0,0 +1,45 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <title>CSS integration - Font from external stylesheet</title>
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/utils.js"></script>
+ <!-- Common global functions for referrer-policy tests. -->
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <meta name="referrer" content="never">
+ </head>
+ <body>
+ <p>Check that resources from external stylesheets are loaded with
+ the referrer and referrer policy from the external stylesheet.</p>
+
+ <div class="styled"></div>
+
+ <script>
+ promise_test(function(css_test) {
+ let id = token();
+ let url_prefix = location.protocol + "//www1." + location.hostname + ":" + location.port;
+ let css_url = url_prefix + "/common/security-features/subresource/stylesheet.py?id=" + id + "&type=font";
+ let font_url = url_prefix + "/common/security-features/subresource/font.py" +
+ "?id=" + id + "&report-headers";
+
+ return new Promise(resolve => {
+ let link = document.createElement("link");
+ link.href = css_url;
+ link.rel = "stylesheet";
+ link.onload = resolve;
+ document.head.appendChild(link);
+ })
+ .then(() => timeoutPromise(css_test, 1000))
+ .then(() => requestViaXhr(font_url))
+ .then(function(message) {
+ assert_own_property(message, "headers");
+ assert_own_property(message, "referrer");
+ assert_equals(message.referrer, css_url);
+ });
+ }, "Font from external stylesheet.");
+ </script>
+
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/css-integration/font-face/internal-import-stylesheet.html b/testing/web-platform/tests/referrer-policy/css-integration/font-face/internal-import-stylesheet.html
new file mode 100644
index 0000000000..d2c8ae754f
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/css-integration/font-face/internal-import-stylesheet.html
@@ -0,0 +1,42 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <title>CSS integration - Font from imported stylesheet (internal)</title>
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/utils.js"></script>
+ <!-- Common global functions for referrer-policy tests. -->
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <meta name="referrer" content="origin">
+ </head>
+ <body>
+ <p>Check that resources from stylesheets (imported from internal
+ stylesheets) are loaded with the referrer and referrer policy from from the
+ imported style sheet.</p>
+
+ <div class="styled"></div>
+
+ <script>
+ promise_test(function(css_test) {
+ let id = token();
+ let url_prefix = location.protocol + "//www1." + location.hostname + ":" +
+ location.port + "/common/security-features/subresource/";
+ let css_url = url_prefix + "stylesheet.py?id=" + id + "&type=font";
+ let font_url = url_prefix + "font.py?report-headers&id=" + id;
+
+ let style = document.createElement("style");
+ style.textContent = "@import url('" + css_url + "');";
+ document.head.appendChild(style);
+ return timeoutPromise(css_test, 1000)
+ .then(() => requestViaXhr(font_url))
+ .then(function(message) {
+ assert_own_property(message, "headers");
+ assert_own_property(message, "referrer");
+ assert_equals(message.referrer, css_url);
+ });
+ }, "Font from imported stylesheet (internal).");
+ </script>
+
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/css-integration/font-face/internal-stylesheet.html b/testing/web-platform/tests/referrer-policy/css-integration/font-face/internal-stylesheet.html
new file mode 100644
index 0000000000..43aa37151b
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/css-integration/font-face/internal-stylesheet.html
@@ -0,0 +1,42 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <title>CSS integration - Font from internal stylesheet</title>
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/utils.js"></script>
+ <!-- Common global functions for referrer-policy tests. -->
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <meta name="referrer" content="origin">
+ </head>
+ <body>
+ <p>Check that resources from internal stylesheets are loaded with
+ the referrer and referrer policy from the document.</p>
+
+ <div class="styled"></div>
+
+ <script>
+ promise_test(function(css_test) {
+ let id = token();
+ let css_url = location.protocol + "//www1." + location.hostname + ":" +
+ location.port +
+ "/common/security-features/subresource/font.py" + "?id=" +
+ id + "&type=font";
+ let font_url = css_url + "&report-headers";
+
+ let style = document.createElement("style");
+ style.textContent = "@font-face { font-family: 'wpt'; font-style: normal; font-weight: normal; src: url(" + css_url + "); format('truetype'); } body { font-family: 'wpt';}";
+ document.head.appendChild(style);
+ return timeoutPromise(css_test, 1000)
+ .then(() => requestViaXhr(font_url))
+ .then(function(message) {
+ assert_own_property(message, "headers");
+ assert_own_property(message, "referrer");
+ assert_equals(message.referrer, location.origin + "/");
+ });
+ }, "Font from internal stylesheet.");
+ </script>
+
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/css-integration/font-face/processing-instruction.html b/testing/web-platform/tests/referrer-policy/css-integration/font-face/processing-instruction.html
new file mode 100644
index 0000000000..6c864afd9a
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/css-integration/font-face/processing-instruction.html
@@ -0,0 +1,48 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <title>CSS integration - Font from external stylesheet inserted via a ProcessingInstruction</title>
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/utils.js"></script>
+ <!-- Common global functions for referrer-policy tests. -->
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <meta name="referrer" content="never">
+ </head>
+ <body>
+ <p>Check that resources from external stylesheets (referenced from a
+ ProcessingInstruction) are loaded with the referrer and referrer policy
+ from the external stylesheet.</p>
+
+ <div class="styled"></div>
+
+ <script>
+ promise_test(function(css_test) {
+ let id = token();
+ let url_prefix = location.protocol + "//www1." + location.hostname + ":" + location.port;
+ let css_url = url_prefix +
+ "/common/security-features/subresource/stylesheet.py?id=" +
+ id + "&amp;type=font";
+ let expected = url_prefix +
+ "/common/security-features/subresource/stylesheet.py?id=" +
+ id + "&type=font";
+ let font_url = url_prefix + "/common/security-features/subresource/font.py" +
+ "?id=" + id + "&report-headers";
+
+ let processingInstruction =
+ document.createProcessingInstruction(
+ "xml-stylesheet", "href=\"" + css_url + "\" type=\"text/css\"");
+ document.insertBefore(processingInstruction, document.firstChild);
+ return timeoutPromise(css_test, 1000)
+ .then(() => requestViaXhr(font_url))
+ .then(function(message) {
+ assert_own_property(message, "headers");
+ assert_own_property(message, "referrer");
+ assert_equals(message.referrer, expected);
+ });
+ }, "Font from external stylesheet (from ProcessingInstruction).");
+ </script>
+
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/css-integration/image/external-import-stylesheet.html b/testing/web-platform/tests/referrer-policy/css-integration/image/external-import-stylesheet.html
new file mode 100644
index 0000000000..15aae6f824
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/css-integration/image/external-import-stylesheet.html
@@ -0,0 +1,51 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <title>CSS integration - image from imported stylesheet (external)</title>
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/utils.js"></script>
+ <!-- Common global functions for referrer-policy tests. -->
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <meta name="referrer" content="never">
+ </head>
+ <body>
+ <p>Check that resources from imported stylesheets (loaded from external
+ stylesheets) are loaded with the referrer and referrer policy from the
+ external stylesheet.</p>
+
+ <div class="styled"></div>
+
+ <script>
+ promise_test(function(css_test) {
+ var id = token();
+ var css_url = location.protocol + "//www1." + location.hostname + ":" + location.port +
+ "/common/security-features/subresource/stylesheet.py?id=" + id +
+ "&import-rule" + "&type=image";
+ var url_prefix = location.protocol + "//" + location.hostname + ":" + location.port;
+ var css_referrer = url_prefix +
+ "/common/security-features/subresource/stylesheet.py?id=" + id +
+ "&type=image";
+ var img_url = url_prefix + "/common/security-features/subresource/image.py" +
+ "?id=" + id + "&report-headers";
+
+ return new Promise(resolve => {
+ var link = document.createElement("link");
+ link.href = css_url;
+ link.rel = "stylesheet";
+ link.onload = resolve;
+ document.head.appendChild(link);
+ })
+ .then(() => timeoutPromise(css_test, 1000))
+ .then(() => requestViaXhr(img_url))
+ .then(function(message) {
+ assert_own_property(message, "headers");
+ assert_own_property(message, "referrer");
+ assert_equals(message.referrer, css_referrer);
+ });
+ }, "Image from imported stylesheet (external).");
+ </script>
+
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/css-integration/image/external-stylesheet.html b/testing/web-platform/tests/referrer-policy/css-integration/image/external-stylesheet.html
new file mode 100644
index 0000000000..eed146dac0
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/css-integration/image/external-stylesheet.html
@@ -0,0 +1,45 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <title>CSS integration - image from external stylesheet</title>
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/utils.js"></script>
+ <!-- Common global functions for referrer-policy tests. -->
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <meta name="referrer" content="never">
+ </head>
+ <body>
+ <p>Check that resources from external stylesheets are loaded with
+ the referrer and referrer policy from the external stylesheet.</p>
+
+ <div class="styled"></div>
+
+ <script>
+ promise_test(function(css_test) {
+ var id = token();
+ var url_prefix = location.protocol + "//www1." + location.hostname + ":" + location.port;
+ var css_url = url_prefix + "/common/security-features/subresource/stylesheet.py?id=" + id;
+ var img_url = url_prefix + "/common/security-features/subresource/image.py" +
+ "?id=" + id + "&report-headers";
+
+ return new Promise(resolve => {
+ var link = document.createElement("link");
+ link.href = css_url;
+ link.rel = "stylesheet";
+ link.onload = resolve;
+ document.head.appendChild(link);
+ })
+ .then(() => timeoutPromise(css_test, 1000))
+ .then(() => requestViaXhr(img_url))
+ .then(function(message) {
+ assert_own_property(message, "headers");
+ assert_own_property(message, "referrer");
+ assert_equals(message.referrer, css_url);
+ });
+ }, "Image from external stylesheet.");
+ </script>
+
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/css-integration/image/inline-style-with-differentorigin-base-tag.tentative.html b/testing/web-platform/tests/referrer-policy/css-integration/image/inline-style-with-differentorigin-base-tag.tentative.html
new file mode 100644
index 0000000000..091afd832a
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/css-integration/image/inline-style-with-differentorigin-base-tag.tentative.html
@@ -0,0 +1,45 @@
+<!DOCTYPE html>
+<title>CSS integration - image from inline style from document with base tag</title>
+<link rel="help" href="https://crbug.com/1158645" />
+
+<head>
+ <meta name="referrer" content="origin">
+</head>
+
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/common/utils.js"></script>
+<!-- Common global functions for referrer-policy tests. -->
+<script src="/common/security-features/resources/common.sub.js"></script>
+
+<!-- This has to follow the <script> tags, or it will make the js files fail to load. -->
+<base href="http://other-site.example" />
+
+<p>Check that resources from inline styles are loaded with
+ the referrer and referrer policy from the document and, in
+ particular, not with the different base URL set in the base tag.</p>
+
+<div class="styled"></div>
+
+<script>
+ 'use strict';
+ promise_test(function(css_test) {
+ var id = token();
+ var css_url = location.protocol + "//www1." + location.hostname + ":" + location.port + "/common/security-features/subresource/image.py" + "?id=" + id;
+ var img_url = css_url + "&report-headers";
+
+ var div = document.querySelector("div.styled");
+ div.style = "content:url(" + css_url + ")";
+ return timeoutPromise(css_test, 1000)
+ .then(() => requestViaXhr(img_url))
+ .then(function(message) {
+ assert_own_property(message, "headers");
+ assert_own_property(message, "referrer");
+ assert_equals(message.referrer, location.origin + "/");
+ });
+ }, "Image from inline styles.");
+</script>
+
+<div id="log"></div>
+
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/css-integration/image/inline-style.html b/testing/web-platform/tests/referrer-policy/css-integration/image/inline-style.html
new file mode 100644
index 0000000000..1e94b3df2c
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/css-integration/image/inline-style.html
@@ -0,0 +1,38 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <title>CSS integration - image from inline style</title>
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/utils.js"></script>
+ <!-- Common global functions for referrer-policy tests. -->
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <meta name="referrer" content="origin">
+ </head>
+ <body>
+ <p>Check that resources from inline styles are loaded with
+ the referrer and referrer policy from the document.</p>
+
+ <div class="styled"></div>
+
+ <script>
+ promise_test(function(css_test) {
+ var id = token();
+ var css_url = location.protocol + "//www1." + location.hostname + ":" + location.port + "/common/security-features/subresource/image.py" + "?id=" + id;
+ var img_url = css_url + "&report-headers";
+
+ var div = document.querySelector("div.styled");
+ div.style = "content:url(" + css_url + ")";
+ return timeoutPromise(css_test, 1000)
+ .then(() => requestViaXhr(img_url))
+ .then(function(message) {
+ assert_own_property(message, "headers");
+ assert_own_property(message, "referrer");
+ assert_equals(message.referrer, location.origin + "/");
+ });
+ }, "Image from inline styles.");
+ </script>
+
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/css-integration/image/internal-import-stylesheet.html b/testing/web-platform/tests/referrer-policy/css-integration/image/internal-import-stylesheet.html
new file mode 100644
index 0000000000..75ca554381
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/css-integration/image/internal-import-stylesheet.html
@@ -0,0 +1,42 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <title>CSS integration - image from imported stylesheet (internal)</title>
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/utils.js"></script>
+ <!-- Common global functions for referrer-policy tests. -->
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <meta name="referrer" content="origin">
+ </head>
+ <body>
+ <p>Check that resources from stylesheets (imported from internal
+ stylesheets) are loaded with the referrer and referrer policy from the
+ document.</p>
+
+ <div class="styled"></div>
+
+ <script>
+ promise_test(function(css_test) {
+ var id = token();
+ var url_prefix = location.protocol + "//www1." + location.hostname + ":" + location.port + "/common/security-features/subresource/";
+ var css_url = url_prefix + "stylesheet.py?id=" + id;
+ var img_url = url_prefix + "image.py?report-headers&id=" + id;
+
+ var style = document.createElement("style");
+ style.type = 'text/css';
+ style.appendChild(document.createTextNode("@import url('" + css_url + "');"));
+ document.head.appendChild(style);
+ return timeoutPromise(css_test, 1000)
+ .then(() => requestViaXhr(img_url))
+ .then(function(message) {
+ assert_own_property(message, "headers");
+ assert_own_property(message, "referrer");
+ assert_equals(message.referrer, css_url);
+ });
+ }, "Image from imported stylesheet (internal).");
+ </script>
+
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/css-integration/image/internal-stylesheet.html b/testing/web-platform/tests/referrer-policy/css-integration/image/internal-stylesheet.html
new file mode 100644
index 0000000000..caef85329f
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/css-integration/image/internal-stylesheet.html
@@ -0,0 +1,40 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <title>CSS integration - image from internal stylesheet</title>
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/utils.js"></script>
+ <!-- Common global functions for referrer-policy tests. -->
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <meta name="referrer" content="origin">
+ </head>
+ <body>
+ <p>Check that resources from internal stylesheets are loaded with
+ the referrer and referrer policy from the document.</p>
+
+ <div class="styled"></div>
+
+ <script>
+ promise_test(function(css_test) {
+ var id = token();
+ var css_url = location.protocol + "//www1." + location.hostname + ":" + location.port + "/common/security-features/subresource/image.py" + "?id=" + id;
+ var img_url = css_url + "&report-headers";
+
+ var style = document.createElement("style");
+ style.type = 'text/css';
+ style.appendChild(document.createTextNode("div.styled::before { content:url(" + css_url + ")}"));
+ document.head.appendChild(style);
+ return timeoutPromise(css_test, 1000)
+ .then(() => requestViaXhr(img_url))
+ .then(function(message) {
+ assert_own_property(message, "headers");
+ assert_own_property(message, "referrer");
+ assert_equals(message.referrer, location.origin + "/");
+ });
+ }, "Image from internal stylesheet.");
+ </script>
+
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/css-integration/image/presentation-attribute.html b/testing/web-platform/tests/referrer-policy/css-integration/image/presentation-attribute.html
new file mode 100644
index 0000000000..df5593b218
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/css-integration/image/presentation-attribute.html
@@ -0,0 +1,35 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <title>CSS integration - image from presentation attribute</title>
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/utils.js"></script>
+ <!-- Common global functions for referrer-policy tests. -->
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <meta name="referrer" content="origin">
+ </head>
+ <body>
+ <p>Check that resources from presentation attributes are loaded with
+ the referrer and referrer policy from the document.</p>
+
+ <script>
+ promise_test(function(css_test) {
+ var id = token();
+ var css_url = location.protocol + "//www1." + location.hostname + ":" + location.port + "/common/security-features/subresource/image.py" + "?id=" + id;
+ var img_url = css_url + "&report-headers";
+
+ document.body.background = css_url;
+ return timeoutPromise(css_test, 1000)
+ .then(() => requestViaXhr(img_url))
+ .then(function(message) {
+ assert_own_property(message, "headers");
+ assert_own_property(message, "referrer");
+ assert_equals(message.referrer, location.origin + "/");
+ });
+ }, "Image from presentation attributes.");
+ </script>
+
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/css-integration/image/processing-instruction.html b/testing/web-platform/tests/referrer-policy/css-integration/image/processing-instruction.html
new file mode 100644
index 0000000000..5d88fcbb6d
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/css-integration/image/processing-instruction.html
@@ -0,0 +1,41 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <title>CSS integration - image from external stylesheet inserted via a ProcessingInstruction</title>
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/utils.js"></script>
+ <!-- Common global functions for referrer-policy tests. -->
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <meta name="referrer" content="never">
+ </head>
+ <body>
+ <p>Check that resources from external stylesheets (referenced from a
+ ProcessingInstruction) are loaded with the referrer and referrer policy
+ from the external stylesheet.</p>
+
+ <div class="styled"></div>
+
+ <script>
+ promise_test(function(css_test) {
+ var id = token();
+ var url_prefix = location.protocol + "//www1." + location.hostname + ":" + location.port;
+ var css_url = url_prefix + "/common/security-features/subresource/stylesheet.py?id=" + id;
+ var img_url = url_prefix + "/common/security-features/subresource/image.py" +
+ "?id=" + id + "&report-headers";
+
+ var processingInstruction = document.createProcessingInstruction("xml-stylesheet", "href=\"" + css_url + "\" type=\"text/css\"");
+ document.insertBefore(processingInstruction, document.firstChild);
+ return timeoutPromise(css_test, 1000)
+ .then(() => requestViaXhr(img_url))
+ .then(function(message) {
+ assert_own_property(message, "headers");
+ assert_own_property(message, "referrer");
+ assert_equals(message.referrer, css_url);
+ });
+ }, "Image from external stylesheet (from ProcessingInstruction).");
+ </script>
+
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/css-integration/svg/external-stylesheet.html b/testing/web-platform/tests/referrer-policy/css-integration/svg/external-stylesheet.html
new file mode 100644
index 0000000000..12bc9eeba6
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/css-integration/svg/external-stylesheet.html
@@ -0,0 +1,41 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <title>CSS integration - styling SVG from external stylesheet</title>
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/utils.js"></script>
+ <!-- Common global functions for referrer-policy tests. -->
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <!-- Helper functions for referrer-policy css tests. -->
+ <script src="/referrer-policy/css-integration/css-test-helper.js"></script>
+ <meta name="referrer" content="never">
+ </head>
+ <body>
+ <p>Check that resources from external stylesheets are loaded with
+ the referrer and referrer policy from the external stylesheet.</p>
+
+ <script>
+ function addLinkStyleSheet(test) {
+ let css_url = url_prefix + "stylesheet.py?id=" + test.id +
+ "&type=svg" + "&property=" + test.property;
+ test.expected = css_url;
+
+ let stylesheet =
+ document.createElementNS("http://www.w3.org/1999/xhtml", "link");
+ stylesheet.setAttribute("type", "text/css");
+ stylesheet.setAttribute("rel", "stylesheet");
+ stylesheet.setAttribute("href", css_url);
+ let svg = createSvg();
+ document.body.appendChild(svg);
+ svg.appendChild(stylesheet);
+ }
+
+ runSvgTests(svg_test_properties,
+ "Test styling SVG from external style",
+ addLinkStyleSheet);
+ </script>
+
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/css-integration/svg/inline-style-with-differentorigin-base-tag.tentative.html b/testing/web-platform/tests/referrer-policy/css-integration/svg/inline-style-with-differentorigin-base-tag.tentative.html
new file mode 100644
index 0000000000..9a8bc6da41
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/css-integration/svg/inline-style-with-differentorigin-base-tag.tentative.html
@@ -0,0 +1,40 @@
+<!DOCTYPE html>
+<html>
+
+<head>
+ <title>CSS integration - styling SVG from inline style on page with different-origin base tag</title>
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/utils.js"></script>
+ <!-- Common global functions for referrer-policy tests. -->
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <!-- Helper functions for referrer-policy css tests. -->
+ <script src="/referrer-policy/css-integration/css-test-helper.js"></script>
+ <meta name="referrer" content="origin">
+</head>
+
+<base href="http://other-page.example/" />
+
+<body>
+ <p>Check that resources from inline styles are loaded with
+ the referrer and referrer policy from the document and, in
+ particular, not from the document's overridden base URL.</p>
+ <script>
+ function setInlineStyle(test) {
+ test.expected = location.origin + "/";
+ let svg = createSvg();
+ document.body.appendChild(svg);
+ let element = svg.getElementsByTagName('path')[0];
+ element.style = test.property + ": url(" + url_prefix + "svg.py?id=" +
+ test.id + "#invalidFragment);";
+ }
+
+ runSvgTests(svg_test_properties,
+ "Styling SVG from inline styles",
+ setInlineStyle);
+ </script>
+
+ <div id="log"></div>
+</body>
+
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/css-integration/svg/inline-style.html b/testing/web-platform/tests/referrer-policy/css-integration/svg/inline-style.html
new file mode 100644
index 0000000000..2d4725e0bb
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/css-integration/svg/inline-style.html
@@ -0,0 +1,35 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <title>CSS integration - styling SVG from inline style</title>
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/utils.js"></script>
+ <!-- Common global functions for referrer-policy tests. -->
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <!-- Helper functions for referrer-policy css tests. -->
+ <script src="/referrer-policy/css-integration/css-test-helper.js"></script>
+ <meta name="referrer" content="origin">
+ </head>
+ <body>
+ <p>Check that resources from inline styles are loaded with
+ the referrer and referrer policy from the document.</p>
+ <script>
+ function setInlineStyle(test)
+ {
+ test.expected = location.origin + "/";
+ let svg = createSvg();
+ document.body.appendChild(svg);
+ let element = svg.getElementsByTagName('path')[0];
+ element.style = test.property + ": url(" + url_prefix + "svg.py?id=" +
+ test.id + "#invalidFragment);";
+ }
+
+ runSvgTests(svg_test_properties,
+ "Styling SVG from inline styles",
+ setInlineStyle);
+ </script>
+
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/css-integration/svg/internal-stylesheet.html b/testing/web-platform/tests/referrer-policy/css-integration/svg/internal-stylesheet.html
new file mode 100644
index 0000000000..38f4cf8b56
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/css-integration/svg/internal-stylesheet.html
@@ -0,0 +1,35 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <title>CSS integration - styling SVG from internal style</title>
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/utils.js"></script>
+ <!-- Common global functions for referrer-policy tests. -->
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <!-- Helper functions for referrer-policy css tests. -->
+ <script src="/referrer-policy/css-integration/css-test-helper.js"></script>
+ <meta name="referrer" content="origin">
+ </head>
+ <body>
+ <p>Check that resources from internal styles are loaded with
+ the referrer and referrer policy from the document.</p>
+ <script>
+ function setInternalStyle(test) {
+ test.expected = location.origin + "/";
+ let style = document.createElementNS(svg_ns, "style");
+ style.textContent = "path { " + test.property + ": url(" + url_prefix +
+ "svg.py?id=" + test.id + "#invalidFragment);";
+ let svg = createSvg();
+ svg.appendChild(style);
+ document.body.appendChild(svg);
+ }
+
+ runSvgTests(svg_test_properties,
+ "Styling SVG from internal styles",
+ setInternalStyle);
+ </script>
+
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/css-integration/svg/presentation-attribute.html b/testing/web-platform/tests/referrer-policy/css-integration/svg/presentation-attribute.html
new file mode 100644
index 0000000000..e2104a6a6c
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/css-integration/svg/presentation-attribute.html
@@ -0,0 +1,40 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <title>CSS integration - styling SVG from external stylesheet from
+ presentation attribute</title>
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/utils.js"></script>
+ <!-- Common global functions for referrer-policy tests. -->
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <!-- Helper functions for referrer-policy css tests. -->
+ <script src="/referrer-policy/css-integration/css-test-helper.js"></script>
+ <meta name="referrer" content="origin">
+ </head>
+ <body>
+ <p>Check that resources from presentation attributes are loaded with
+ the referrer and referrer policy from the document.</p>
+ <script>
+ function setPresentationAttribute(test)
+ {
+ test.expected = location.origin + "/";
+ let svg = createSvg();
+ document.body.appendChild(svg);
+ let element = svg.getElementsByTagName("path")[0];
+ // The test property should have map 1:1 with presentation attribute.
+ let attr = test.property;
+ element.setAttribute(attr, "url(" + url_prefix + "svg.py?id=" +
+ test.id + "#invalidFragment)");
+ }
+
+ // mask-image is not the presentation attribute.
+ runSvgTests(svg_test_properties.filter(p => p != 'mask-image'),
+ "Styling SVG from presentation attributes",
+ setPresentationAttribute);
+ </script>
+
+ <div id="log"></div>
+ </body>
+</html>
+
diff --git a/testing/web-platform/tests/referrer-policy/css-integration/svg/processing-instruction.html b/testing/web-platform/tests/referrer-policy/css-integration/svg/processing-instruction.html
new file mode 100644
index 0000000000..4ff9a51890
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/css-integration/svg/processing-instruction.html
@@ -0,0 +1,38 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <title>CSS integration - styling SVG from external stylesheet via
+ ProcessingInstruction</title>
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/utils.js"></script>
+ <!-- Common global functions for referrer-policy tests. -->
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <!-- Helper functions for referrer-policy css tests. -->
+ <script src="/referrer-policy/css-integration/css-test-helper.js"></script>
+ <meta name="referrer" content="origin">
+ </head>
+ <body>
+ <p>Check that resources from external stylesheets (referenced from a
+ ProcessingInstruction) are loaded with the referrer and referrer policy
+ from the external stylesheet.</p>
+ <script>
+ function addProcessingInstruction(test) {
+ let svg_url = url_prefix + "svg.py?id=" + test.id + "&type=svg" +
+ "&property=" + test.property + "&embedded-svg";
+ let iframe = document.createElement("iframe");
+ test.expected = url_prefix + "stylesheet.py?id=" + test.id +
+ "&type=svg" + "&property=" + test.property;
+ iframe.src = svg_url;
+ document.body.appendChild(iframe);
+ }
+
+ runSvgTests(svg_test_properties,
+ "Styling SVG from ProcessingInstruction",
+ addProcessingInstruction);
+ </script>
+
+ <div id="log"></div>
+ </body>
+</html>
+
diff --git a/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/no-referrer-when-downgrade/a-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/no-referrer-when-downgrade/a-tag.http.html
new file mode 100644
index 0000000000..f1f2922073
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/no-referrer-when-downgrade/a-tag.http.html
@@ -0,0 +1,107 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "a-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for a-tag to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "a-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for a-tag to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "a-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for a-tag to same-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "a-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for a-tag to same-https origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/no-referrer-when-downgrade/fetch.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/no-referrer-when-downgrade/fetch.http.html
new file mode 100644
index 0000000000..b7e0f595f2
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/no-referrer-when-downgrade/fetch.http.html
@@ -0,0 +1,275 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-https origin and swap-origin redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/no-referrer-when-downgrade/iframe-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/no-referrer-when-downgrade/iframe-tag.http.html
new file mode 100644
index 0000000000..d5bfd2b50a
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/no-referrer-when-downgrade/iframe-tag.http.html
@@ -0,0 +1,275 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-https origin and swap-origin redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/no-referrer-when-downgrade/img-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/no-referrer-when-downgrade/img-tag.http.html
new file mode 100644
index 0000000000..c324e8cd7e
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/no-referrer-when-downgrade/img-tag.http.html
@@ -0,0 +1,275 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-https origin and swap-origin redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/no-referrer-when-downgrade/script-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/no-referrer-when-downgrade/script-tag.http.html
new file mode 100644
index 0000000000..4d57f8c26a
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/no-referrer-when-downgrade/script-tag.http.html
@@ -0,0 +1,275 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-https origin and swap-origin redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/no-referrer-when-downgrade/sharedworker-classic.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/no-referrer-when-downgrade/sharedworker-classic.http.html
new file mode 100644
index 0000000000..22eb1e2954
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/no-referrer-when-downgrade/sharedworker-classic.http.html
@@ -0,0 +1,65 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "sharedworker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for sharedworker-classic to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "sharedworker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for sharedworker-classic to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/no-referrer-when-downgrade/sharedworker-module.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/no-referrer-when-downgrade/sharedworker-module.http.html
new file mode 100644
index 0000000000..4508b27090
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/no-referrer-when-downgrade/sharedworker-module.http.html
@@ -0,0 +1,65 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "sharedworker-module",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for sharedworker-module to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "sharedworker-module",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for sharedworker-module to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/no-referrer-when-downgrade/worker-classic.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/no-referrer-when-downgrade/worker-classic.http.html
new file mode 100644
index 0000000000..436592e04f
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/no-referrer-when-downgrade/worker-classic.http.html
@@ -0,0 +1,65 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "worker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-classic to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "worker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-classic to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/no-referrer-when-downgrade/worker-module.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/no-referrer-when-downgrade/worker-module.http.html
new file mode 100644
index 0000000000..467bedf744
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/no-referrer-when-downgrade/worker-module.http.html
@@ -0,0 +1,65 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "worker-module",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-module to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "worker-module",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-module to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/no-referrer-when-downgrade/xhr.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/no-referrer-when-downgrade/xhr.http.html
new file mode 100644
index 0000000000..4d19f48f8a
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/no-referrer-when-downgrade/xhr.http.html
@@ -0,0 +1,275 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-https origin and swap-origin redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/no-referrer/a-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/no-referrer/a-tag.http.html
new file mode 100644
index 0000000000..decbbda04c
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/no-referrer/a-tag.http.html
@@ -0,0 +1,107 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "omitted",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "a-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for a-tag to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "a-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for a-tag to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "a-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for a-tag to same-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "a-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for a-tag to same-https origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/no-referrer/fetch.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/no-referrer/fetch.http.html
new file mode 100644
index 0000000000..d523a3109f
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/no-referrer/fetch.http.html
@@ -0,0 +1,275 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "omitted",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for fetch to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for fetch to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for fetch to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for fetch to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for fetch to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for fetch to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for fetch to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for fetch to same-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for fetch to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "same-https",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for fetch to same-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for fetch to same-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for fetch to same-https origin and swap-origin redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/no-referrer/iframe-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/no-referrer/iframe-tag.http.html
new file mode 100644
index 0000000000..7761fb304d
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/no-referrer/iframe-tag.http.html
@@ -0,0 +1,275 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "omitted",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for iframe-tag to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for iframe-tag to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for iframe-tag to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for iframe-tag to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for iframe-tag to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for iframe-tag to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for iframe-tag to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for iframe-tag to same-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for iframe-tag to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "same-https",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for iframe-tag to same-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for iframe-tag to same-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for iframe-tag to same-https origin and swap-origin redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/no-referrer/img-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/no-referrer/img-tag.http.html
new file mode 100644
index 0000000000..f71ded5fb6
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/no-referrer/img-tag.http.html
@@ -0,0 +1,275 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "omitted",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for img-tag to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for img-tag to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for img-tag to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for img-tag to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for img-tag to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for img-tag to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for img-tag to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for img-tag to same-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for img-tag to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "same-https",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for img-tag to same-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for img-tag to same-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for img-tag to same-https origin and swap-origin redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/no-referrer/script-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/no-referrer/script-tag.http.html
new file mode 100644
index 0000000000..5430b987e1
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/no-referrer/script-tag.http.html
@@ -0,0 +1,275 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "omitted",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for script-tag to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for script-tag to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for script-tag to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for script-tag to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for script-tag to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for script-tag to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for script-tag to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for script-tag to same-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for script-tag to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "same-https",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for script-tag to same-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for script-tag to same-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for script-tag to same-https origin and swap-origin redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/no-referrer/sharedworker-classic.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/no-referrer/sharedworker-classic.http.html
new file mode 100644
index 0000000000..0995bcdb0a
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/no-referrer/sharedworker-classic.http.html
@@ -0,0 +1,65 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "omitted",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "sharedworker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for sharedworker-classic to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "sharedworker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for sharedworker-classic to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/no-referrer/sharedworker-module.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/no-referrer/sharedworker-module.http.html
new file mode 100644
index 0000000000..2991201b1d
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/no-referrer/sharedworker-module.http.html
@@ -0,0 +1,65 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "omitted",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "sharedworker-module",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for sharedworker-module to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "sharedworker-module",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for sharedworker-module to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/no-referrer/worker-classic.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/no-referrer/worker-classic.http.html
new file mode 100644
index 0000000000..538136079f
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/no-referrer/worker-classic.http.html
@@ -0,0 +1,65 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "omitted",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "worker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for worker-classic to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "worker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for worker-classic to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/no-referrer/worker-module.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/no-referrer/worker-module.http.html
new file mode 100644
index 0000000000..44427600d9
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/no-referrer/worker-module.http.html
@@ -0,0 +1,65 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "omitted",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "worker-module",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for worker-module to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "worker-module",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for worker-module to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/no-referrer/xhr.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/no-referrer/xhr.http.html
new file mode 100644
index 0000000000..ab624c0248
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/no-referrer/xhr.http.html
@@ -0,0 +1,275 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "omitted",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for xhr to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for xhr to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for xhr to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for xhr to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for xhr to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for xhr to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for xhr to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for xhr to same-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for xhr to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "same-https",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for xhr to same-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for xhr to same-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for xhr to same-https origin and swap-origin redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/origin-when-cross-origin/a-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/origin-when-cross-origin/a-tag.http.html
new file mode 100644
index 0000000000..e4c0a46454
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/origin-when-cross-origin/a-tag.http.html
@@ -0,0 +1,107 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "a-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for a-tag to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "a-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for a-tag to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "a-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for a-tag to same-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "a-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for a-tag to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/origin-when-cross-origin/fetch.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/origin-when-cross-origin/fetch.http.html
new file mode 100644
index 0000000000..c7726795b0
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/origin-when-cross-origin/fetch.http.html
@@ -0,0 +1,275 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for fetch to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for fetch to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for fetch to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for fetch to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for fetch to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for fetch to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for fetch to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for fetch to same-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for fetch to same-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for fetch to same-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/origin-when-cross-origin/iframe-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/origin-when-cross-origin/iframe-tag.http.html
new file mode 100644
index 0000000000..3b9e56daf6
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/origin-when-cross-origin/iframe-tag.http.html
@@ -0,0 +1,275 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for iframe-tag to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for iframe-tag to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for iframe-tag to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for iframe-tag to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for iframe-tag to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for iframe-tag to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for iframe-tag to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for iframe-tag to same-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for iframe-tag to same-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for iframe-tag to same-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/origin-when-cross-origin/img-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/origin-when-cross-origin/img-tag.http.html
new file mode 100644
index 0000000000..9390e76dc3
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/origin-when-cross-origin/img-tag.http.html
@@ -0,0 +1,275 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for img-tag to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for img-tag to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for img-tag to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for img-tag to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for img-tag to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for img-tag to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for img-tag to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for img-tag to same-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for img-tag to same-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for img-tag to same-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/origin-when-cross-origin/script-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/origin-when-cross-origin/script-tag.http.html
new file mode 100644
index 0000000000..e47e3756f9
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/origin-when-cross-origin/script-tag.http.html
@@ -0,0 +1,275 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for script-tag to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for script-tag to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for script-tag to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for script-tag to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for script-tag to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for script-tag to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for script-tag to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for script-tag to same-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for script-tag to same-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for script-tag to same-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/origin-when-cross-origin/sharedworker-classic.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/origin-when-cross-origin/sharedworker-classic.http.html
new file mode 100644
index 0000000000..382da887af
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/origin-when-cross-origin/sharedworker-classic.http.html
@@ -0,0 +1,65 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "sharedworker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for sharedworker-classic to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "sharedworker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for sharedworker-classic to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/origin-when-cross-origin/sharedworker-module.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/origin-when-cross-origin/sharedworker-module.http.html
new file mode 100644
index 0000000000..103c19e599
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/origin-when-cross-origin/sharedworker-module.http.html
@@ -0,0 +1,65 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "sharedworker-module",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for sharedworker-module to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "sharedworker-module",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for sharedworker-module to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/origin-when-cross-origin/worker-classic.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/origin-when-cross-origin/worker-classic.http.html
new file mode 100644
index 0000000000..66e2049df2
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/origin-when-cross-origin/worker-classic.http.html
@@ -0,0 +1,65 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "worker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-classic to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "worker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-classic to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/origin-when-cross-origin/worker-module.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/origin-when-cross-origin/worker-module.http.html
new file mode 100644
index 0000000000..0ad84cd003
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/origin-when-cross-origin/worker-module.http.html
@@ -0,0 +1,65 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "worker-module",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-module to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "worker-module",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-module to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/origin-when-cross-origin/xhr.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/origin-when-cross-origin/xhr.http.html
new file mode 100644
index 0000000000..f2d5d14f43
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/origin-when-cross-origin/xhr.http.html
@@ -0,0 +1,275 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for xhr to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for xhr to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for xhr to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for xhr to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for xhr to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for xhr to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for xhr to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for xhr to same-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for xhr to same-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for xhr to same-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/origin/a-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/origin/a-tag.http.html
new file mode 100644
index 0000000000..8f72f1e49e
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/origin/a-tag.http.html
@@ -0,0 +1,107 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "a-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for a-tag to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "a-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for a-tag to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "a-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for a-tag to same-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "a-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for a-tag to same-https origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/origin/fetch.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/origin/fetch.http.html
new file mode 100644
index 0000000000..6783464cb0
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/origin/fetch.http.html
@@ -0,0 +1,275 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for fetch to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for fetch to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for fetch to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for fetch to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for fetch to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for fetch to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for fetch to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for fetch to same-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for fetch to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for fetch to same-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for fetch to same-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for fetch to same-https origin and swap-origin redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/origin/iframe-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/origin/iframe-tag.http.html
new file mode 100644
index 0000000000..33fdbb165a
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/origin/iframe-tag.http.html
@@ -0,0 +1,275 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for iframe-tag to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for iframe-tag to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for iframe-tag to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for iframe-tag to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for iframe-tag to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for iframe-tag to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for iframe-tag to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for iframe-tag to same-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for iframe-tag to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for iframe-tag to same-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for iframe-tag to same-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for iframe-tag to same-https origin and swap-origin redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/origin/img-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/origin/img-tag.http.html
new file mode 100644
index 0000000000..643d67642c
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/origin/img-tag.http.html
@@ -0,0 +1,275 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for img-tag to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for img-tag to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for img-tag to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for img-tag to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for img-tag to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for img-tag to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for img-tag to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for img-tag to same-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for img-tag to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for img-tag to same-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for img-tag to same-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for img-tag to same-https origin and swap-origin redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/origin/script-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/origin/script-tag.http.html
new file mode 100644
index 0000000000..369c51249c
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/origin/script-tag.http.html
@@ -0,0 +1,275 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for script-tag to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for script-tag to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for script-tag to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for script-tag to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for script-tag to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for script-tag to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for script-tag to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for script-tag to same-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for script-tag to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for script-tag to same-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for script-tag to same-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for script-tag to same-https origin and swap-origin redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/origin/sharedworker-classic.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/origin/sharedworker-classic.http.html
new file mode 100644
index 0000000000..55bee06493
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/origin/sharedworker-classic.http.html
@@ -0,0 +1,65 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "origin",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "sharedworker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for sharedworker-classic to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "sharedworker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for sharedworker-classic to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/origin/sharedworker-module.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/origin/sharedworker-module.http.html
new file mode 100644
index 0000000000..86b6fa4378
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/origin/sharedworker-module.http.html
@@ -0,0 +1,65 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "origin",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "sharedworker-module",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for sharedworker-module to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "sharedworker-module",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for sharedworker-module to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/origin/worker-classic.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/origin/worker-classic.http.html
new file mode 100644
index 0000000000..257f3d7979
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/origin/worker-classic.http.html
@@ -0,0 +1,65 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "origin",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "worker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for worker-classic to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "worker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for worker-classic to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/origin/worker-module.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/origin/worker-module.http.html
new file mode 100644
index 0000000000..fb5d2dbd4e
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/origin/worker-module.http.html
@@ -0,0 +1,65 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "origin",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "worker-module",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for worker-module to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "worker-module",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for worker-module to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/origin/xhr.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/origin/xhr.http.html
new file mode 100644
index 0000000000..6f8e94468f
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/origin/xhr.http.html
@@ -0,0 +1,275 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for xhr to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for xhr to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for xhr to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for xhr to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for xhr to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for xhr to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for xhr to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for xhr to same-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for xhr to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for xhr to same-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for xhr to same-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for xhr to same-https origin and swap-origin redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/same-origin/a-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/same-origin/a-tag.http.html
new file mode 100644
index 0000000000..eeaa4336fa
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/same-origin/a-tag.http.html
@@ -0,0 +1,86 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "omitted",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "same-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "a-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for a-tag to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "same-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "a-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for a-tag to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "same-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "a-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for a-tag to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/same-origin/fetch.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/same-origin/fetch.http.html
new file mode 100644
index 0000000000..7e27bcf458
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/same-origin/fetch.http.html
@@ -0,0 +1,233 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "omitted",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "same-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for fetch to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "same-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for fetch to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "same-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for fetch to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "same-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for fetch to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "same-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for fetch to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "same-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for fetch to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "same-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for fetch to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "same-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for fetch to same-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "same-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "same-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/same-origin/iframe-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/same-origin/iframe-tag.http.html
new file mode 100644
index 0000000000..556c02fced
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/same-origin/iframe-tag.http.html
@@ -0,0 +1,233 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "omitted",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "same-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for iframe-tag to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "same-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for iframe-tag to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "same-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for iframe-tag to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "same-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for iframe-tag to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "same-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for iframe-tag to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "same-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for iframe-tag to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "same-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for iframe-tag to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "same-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for iframe-tag to same-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "same-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "same-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/same-origin/img-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/same-origin/img-tag.http.html
new file mode 100644
index 0000000000..a1c21c7879
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/same-origin/img-tag.http.html
@@ -0,0 +1,233 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "omitted",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "same-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for img-tag to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "same-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for img-tag to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "same-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for img-tag to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "same-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for img-tag to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "same-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for img-tag to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "same-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for img-tag to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "same-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for img-tag to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "same-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for img-tag to same-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "same-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "same-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/same-origin/script-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/same-origin/script-tag.http.html
new file mode 100644
index 0000000000..1482e6ab23
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/same-origin/script-tag.http.html
@@ -0,0 +1,233 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "omitted",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "same-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for script-tag to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "same-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for script-tag to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "same-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for script-tag to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "same-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for script-tag to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "same-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for script-tag to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "same-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for script-tag to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "same-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for script-tag to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "same-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for script-tag to same-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "same-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "same-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/same-origin/sharedworker-classic.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/same-origin/sharedworker-classic.http.html
new file mode 100644
index 0000000000..950a1d4d25
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/same-origin/sharedworker-classic.http.html
@@ -0,0 +1,65 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "same-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "sharedworker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for sharedworker-classic to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "same-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "sharedworker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for sharedworker-classic to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/same-origin/sharedworker-module.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/same-origin/sharedworker-module.http.html
new file mode 100644
index 0000000000..f016f91d5e
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/same-origin/sharedworker-module.http.html
@@ -0,0 +1,65 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "same-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "sharedworker-module",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for sharedworker-module to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "same-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "sharedworker-module",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for sharedworker-module to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/same-origin/worker-classic.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/same-origin/worker-classic.http.html
new file mode 100644
index 0000000000..cf70c87048
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/same-origin/worker-classic.http.html
@@ -0,0 +1,65 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "same-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "worker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-classic to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "same-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "worker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-classic to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/same-origin/worker-module.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/same-origin/worker-module.http.html
new file mode 100644
index 0000000000..5e4d368767
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/same-origin/worker-module.http.html
@@ -0,0 +1,65 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "same-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "worker-module",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-module to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "same-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "worker-module",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-module to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/same-origin/xhr.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/same-origin/xhr.http.html
new file mode 100644
index 0000000000..95d8d350bb
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/same-origin/xhr.http.html
@@ -0,0 +1,233 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "omitted",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "same-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for xhr to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "same-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for xhr to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "same-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for xhr to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "same-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for xhr to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "same-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for xhr to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "same-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for xhr to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "same-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for xhr to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "same-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for xhr to same-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "same-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "same-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/strict-origin-when-cross-origin/a-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/strict-origin-when-cross-origin/a-tag.http.html
new file mode 100644
index 0000000000..525bfa27f2
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/strict-origin-when-cross-origin/a-tag.http.html
@@ -0,0 +1,107 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "a-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for a-tag to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "a-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for a-tag to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "a-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for a-tag to same-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "a-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for a-tag to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/strict-origin-when-cross-origin/fetch.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/strict-origin-when-cross-origin/fetch.http.html
new file mode 100644
index 0000000000..ebef571be7
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/strict-origin-when-cross-origin/fetch.http.html
@@ -0,0 +1,275 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for fetch to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for fetch to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for fetch to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for fetch to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for fetch to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for fetch to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for fetch to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for fetch to same-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for fetch to same-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for fetch to same-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/strict-origin-when-cross-origin/iframe-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/strict-origin-when-cross-origin/iframe-tag.http.html
new file mode 100644
index 0000000000..63e090472c
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/strict-origin-when-cross-origin/iframe-tag.http.html
@@ -0,0 +1,275 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for iframe-tag to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for iframe-tag to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for iframe-tag to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for iframe-tag to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for iframe-tag to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for iframe-tag to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for iframe-tag to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for iframe-tag to same-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for iframe-tag to same-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for iframe-tag to same-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/strict-origin-when-cross-origin/img-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/strict-origin-when-cross-origin/img-tag.http.html
new file mode 100644
index 0000000000..abad45992b
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/strict-origin-when-cross-origin/img-tag.http.html
@@ -0,0 +1,275 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for img-tag to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for img-tag to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for img-tag to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for img-tag to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for img-tag to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for img-tag to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for img-tag to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for img-tag to same-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for img-tag to same-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for img-tag to same-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/strict-origin-when-cross-origin/script-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/strict-origin-when-cross-origin/script-tag.http.html
new file mode 100644
index 0000000000..733005e56c
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/strict-origin-when-cross-origin/script-tag.http.html
@@ -0,0 +1,275 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for script-tag to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for script-tag to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for script-tag to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for script-tag to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for script-tag to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for script-tag to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for script-tag to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for script-tag to same-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for script-tag to same-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for script-tag to same-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/strict-origin-when-cross-origin/sharedworker-classic.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/strict-origin-when-cross-origin/sharedworker-classic.http.html
new file mode 100644
index 0000000000..e0bba29ee7
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/strict-origin-when-cross-origin/sharedworker-classic.http.html
@@ -0,0 +1,65 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "sharedworker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for sharedworker-classic to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "sharedworker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for sharedworker-classic to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/strict-origin-when-cross-origin/sharedworker-module.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/strict-origin-when-cross-origin/sharedworker-module.http.html
new file mode 100644
index 0000000000..82a82e00df
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/strict-origin-when-cross-origin/sharedworker-module.http.html
@@ -0,0 +1,65 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "sharedworker-module",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for sharedworker-module to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "sharedworker-module",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for sharedworker-module to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/strict-origin-when-cross-origin/worker-classic.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/strict-origin-when-cross-origin/worker-classic.http.html
new file mode 100644
index 0000000000..9491e8be2f
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/strict-origin-when-cross-origin/worker-classic.http.html
@@ -0,0 +1,65 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "worker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-classic to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "worker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-classic to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/strict-origin-when-cross-origin/worker-module.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/strict-origin-when-cross-origin/worker-module.http.html
new file mode 100644
index 0000000000..a15bda3e1d
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/strict-origin-when-cross-origin/worker-module.http.html
@@ -0,0 +1,65 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "worker-module",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-module to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "worker-module",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-module to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/strict-origin-when-cross-origin/xhr.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/strict-origin-when-cross-origin/xhr.http.html
new file mode 100644
index 0000000000..c8cd8582d4
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/strict-origin-when-cross-origin/xhr.http.html
@@ -0,0 +1,275 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for xhr to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for xhr to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for xhr to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for xhr to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for xhr to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for xhr to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for xhr to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for xhr to same-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for xhr to same-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for xhr to same-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/strict-origin/a-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/strict-origin/a-tag.http.html
new file mode 100644
index 0000000000..13c7c76c22
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/strict-origin/a-tag.http.html
@@ -0,0 +1,107 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "a-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for a-tag to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "a-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for a-tag to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "a-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for a-tag to same-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "a-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for a-tag to same-https origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/strict-origin/fetch.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/strict-origin/fetch.http.html
new file mode 100644
index 0000000000..dec9d7a970
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/strict-origin/fetch.http.html
@@ -0,0 +1,275 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for fetch to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for fetch to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for fetch to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for fetch to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for fetch to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for fetch to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for fetch to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for fetch to same-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for fetch to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for fetch to same-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for fetch to same-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for fetch to same-https origin and swap-origin redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/strict-origin/iframe-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/strict-origin/iframe-tag.http.html
new file mode 100644
index 0000000000..5a491f1ba4
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/strict-origin/iframe-tag.http.html
@@ -0,0 +1,275 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for iframe-tag to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for iframe-tag to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for iframe-tag to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for iframe-tag to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for iframe-tag to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for iframe-tag to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for iframe-tag to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for iframe-tag to same-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for iframe-tag to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for iframe-tag to same-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for iframe-tag to same-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for iframe-tag to same-https origin and swap-origin redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/strict-origin/img-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/strict-origin/img-tag.http.html
new file mode 100644
index 0000000000..f6f1ff0a60
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/strict-origin/img-tag.http.html
@@ -0,0 +1,275 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for img-tag to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for img-tag to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for img-tag to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for img-tag to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for img-tag to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for img-tag to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for img-tag to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for img-tag to same-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for img-tag to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for img-tag to same-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for img-tag to same-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for img-tag to same-https origin and swap-origin redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/strict-origin/script-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/strict-origin/script-tag.http.html
new file mode 100644
index 0000000000..589dc4c12c
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/strict-origin/script-tag.http.html
@@ -0,0 +1,275 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for script-tag to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for script-tag to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for script-tag to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for script-tag to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for script-tag to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for script-tag to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for script-tag to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for script-tag to same-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for script-tag to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for script-tag to same-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for script-tag to same-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for script-tag to same-https origin and swap-origin redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/strict-origin/sharedworker-classic.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/strict-origin/sharedworker-classic.http.html
new file mode 100644
index 0000000000..3d10da188f
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/strict-origin/sharedworker-classic.http.html
@@ -0,0 +1,65 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "origin",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "sharedworker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for sharedworker-classic to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "sharedworker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for sharedworker-classic to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/strict-origin/sharedworker-module.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/strict-origin/sharedworker-module.http.html
new file mode 100644
index 0000000000..52212670b9
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/strict-origin/sharedworker-module.http.html
@@ -0,0 +1,65 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "origin",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "sharedworker-module",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for sharedworker-module to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "sharedworker-module",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for sharedworker-module to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/strict-origin/worker-classic.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/strict-origin/worker-classic.http.html
new file mode 100644
index 0000000000..d23ebf7dad
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/strict-origin/worker-classic.http.html
@@ -0,0 +1,65 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "origin",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "worker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for worker-classic to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "worker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for worker-classic to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/strict-origin/worker-module.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/strict-origin/worker-module.http.html
new file mode 100644
index 0000000000..93daddf304
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/strict-origin/worker-module.http.html
@@ -0,0 +1,65 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "origin",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "worker-module",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for worker-module to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "worker-module",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for worker-module to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/strict-origin/xhr.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/strict-origin/xhr.http.html
new file mode 100644
index 0000000000..be9b71f695
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/strict-origin/xhr.http.html
@@ -0,0 +1,275 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for xhr to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for xhr to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for xhr to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for xhr to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for xhr to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for xhr to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for xhr to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for xhr to same-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for xhr to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for xhr to same-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for xhr to same-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for xhr to same-https origin and swap-origin redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/unsafe-url/a-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/unsafe-url/a-tag.http.html
new file mode 100644
index 0000000000..34a7a49e7c
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/unsafe-url/a-tag.http.html
@@ -0,0 +1,107 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="no-referrer">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "a-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for a-tag to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "a-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for a-tag to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "a-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for a-tag to same-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "a-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for a-tag to same-https origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/unsafe-url/fetch.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/unsafe-url/fetch.http.html
new file mode 100644
index 0000000000..21cd62f1e8
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/unsafe-url/fetch.http.html
@@ -0,0 +1,275 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="no-referrer">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-https origin and swap-origin redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/unsafe-url/iframe-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/unsafe-url/iframe-tag.http.html
new file mode 100644
index 0000000000..8ba4ffabf0
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/unsafe-url/iframe-tag.http.html
@@ -0,0 +1,275 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="no-referrer">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-https origin and swap-origin redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/unsafe-url/img-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/unsafe-url/img-tag.http.html
new file mode 100644
index 0000000000..092fd4fc4d
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/unsafe-url/img-tag.http.html
@@ -0,0 +1,275 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="no-referrer">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-https origin and swap-origin redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/unsafe-url/script-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/unsafe-url/script-tag.http.html
new file mode 100644
index 0000000000..4d50b3b90c
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/unsafe-url/script-tag.http.html
@@ -0,0 +1,275 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="no-referrer">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-https origin and swap-origin redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/unsafe-url/sharedworker-classic.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/unsafe-url/sharedworker-classic.http.html
new file mode 100644
index 0000000000..952dc99dd2
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/unsafe-url/sharedworker-classic.http.html
@@ -0,0 +1,65 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="no-referrer">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "sharedworker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for sharedworker-classic to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "sharedworker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for sharedworker-classic to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/unsafe-url/sharedworker-module.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/unsafe-url/sharedworker-module.http.html
new file mode 100644
index 0000000000..6712399a63
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/unsafe-url/sharedworker-module.http.html
@@ -0,0 +1,65 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="no-referrer">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "sharedworker-module",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for sharedworker-module to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "sharedworker-module",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for sharedworker-module to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/unsafe-url/worker-classic.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/unsafe-url/worker-classic.http.html
new file mode 100644
index 0000000000..4bc6031699
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/unsafe-url/worker-classic.http.html
@@ -0,0 +1,65 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="no-referrer">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "worker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-classic to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "worker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-classic to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/unsafe-url/worker-module.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/unsafe-url/worker-module.http.html
new file mode 100644
index 0000000000..05f15a98e9
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/unsafe-url/worker-module.http.html
@@ -0,0 +1,65 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="no-referrer">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "worker-module",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-module to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "worker-module",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-module to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/unsafe-url/xhr.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/unsafe-url/xhr.http.html
new file mode 100644
index 0000000000..1d28925229
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/unsafe-url/xhr.http.html
@@ -0,0 +1,275 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="no-referrer">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-https origin and swap-origin redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/unset/a-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/unset/a-tag.http.html
new file mode 100644
index 0000000000..97ecbd9b1c
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/unset/a-tag.http.html
@@ -0,0 +1,83 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "a-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for a-tag to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "a-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for a-tag to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "a-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for a-tag to same-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "a-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for a-tag to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/unset/fetch.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/unset/fetch.http.html
new file mode 100644
index 0000000000..c9e6568b4e
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/unset/fetch.http.html
@@ -0,0 +1,203 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for fetch to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for fetch to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for fetch to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for fetch to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for fetch to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for fetch to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for fetch to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for fetch to same-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for fetch to same-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for fetch to same-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/unset/iframe-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/unset/iframe-tag.http.html
new file mode 100644
index 0000000000..8899ecd0c6
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/unset/iframe-tag.http.html
@@ -0,0 +1,203 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for iframe-tag to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for iframe-tag to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for iframe-tag to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for iframe-tag to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for iframe-tag to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for iframe-tag to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for iframe-tag to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for iframe-tag to same-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for iframe-tag to same-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for iframe-tag to same-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/unset/img-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/unset/img-tag.http.html
new file mode 100644
index 0000000000..26c803da6b
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/unset/img-tag.http.html
@@ -0,0 +1,203 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for img-tag to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for img-tag to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for img-tag to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for img-tag to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for img-tag to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for img-tag to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for img-tag to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for img-tag to same-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for img-tag to same-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for img-tag to same-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/unset/script-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/unset/script-tag.http.html
new file mode 100644
index 0000000000..96c068d050
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/unset/script-tag.http.html
@@ -0,0 +1,203 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for script-tag to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for script-tag to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for script-tag to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for script-tag to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for script-tag to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for script-tag to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for script-tag to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for script-tag to same-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for script-tag to same-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for script-tag to same-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/unset/sharedworker-classic.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/unset/sharedworker-classic.http.html
new file mode 100644
index 0000000000..8ed80c689c
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/unset/sharedworker-classic.http.html
@@ -0,0 +1,53 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "sharedworker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for sharedworker-classic to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "sharedworker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for sharedworker-classic to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/unset/sharedworker-module.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/unset/sharedworker-module.http.html
new file mode 100644
index 0000000000..c5b8979ba0
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/unset/sharedworker-module.http.html
@@ -0,0 +1,53 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "sharedworker-module",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for sharedworker-module to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "sharedworker-module",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for sharedworker-module to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/unset/worker-classic.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/unset/worker-classic.http.html
new file mode 100644
index 0000000000..de239fa7de
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/unset/worker-classic.http.html
@@ -0,0 +1,53 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "worker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-classic to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "worker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-classic to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/unset/worker-module.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/unset/worker-module.http.html
new file mode 100644
index 0000000000..05d0a51b7c
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/unset/worker-module.http.html
@@ -0,0 +1,53 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "worker-module",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-module to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "worker-module",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-module to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/unset/xhr.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/unset/xhr.http.html
new file mode 100644
index 0000000000..eee8742db8
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/unset/xhr.http.html
@@ -0,0 +1,203 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for xhr to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for xhr to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for xhr to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for xhr to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for xhr to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for xhr to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for xhr to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for xhr to same-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for xhr to same-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for xhr to same-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/iframe.meta/always/a-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.meta/always/a-tag.http.html
new file mode 100644
index 0000000000..a65ec53be5
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/iframe.meta/always/a-tag.http.html
@@ -0,0 +1,107 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "always"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "a-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for a-tag to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "always"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "a-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for a-tag to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "always"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "a-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for a-tag to same-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "always"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "a-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for a-tag to same-https origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/iframe.meta/always/fetch.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.meta/always/fetch.http.html
new file mode 100644
index 0000000000..e6de7f582d
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/iframe.meta/always/fetch.http.html
@@ -0,0 +1,275 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "always"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "always"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "always"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "always"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "always"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "always"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "always"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "always"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "always"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "always"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "always"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "always"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-https origin and swap-origin redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/iframe.meta/always/iframe-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.meta/always/iframe-tag.http.html
new file mode 100644
index 0000000000..42033e0058
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/iframe.meta/always/iframe-tag.http.html
@@ -0,0 +1,275 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "always"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "always"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "always"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "always"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "always"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "always"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "always"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "always"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "always"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "always"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "always"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "always"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-https origin and swap-origin redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/iframe.meta/always/img-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.meta/always/img-tag.http.html
new file mode 100644
index 0000000000..8a8ee984bd
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/iframe.meta/always/img-tag.http.html
@@ -0,0 +1,275 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "always"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "always"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "always"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "always"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "always"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "always"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "always"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "always"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "always"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "always"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "always"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "always"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-https origin and swap-origin redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/iframe.meta/always/script-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.meta/always/script-tag.http.html
new file mode 100644
index 0000000000..741a2c7b35
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/iframe.meta/always/script-tag.http.html
@@ -0,0 +1,275 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "always"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "always"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "always"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "always"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "always"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "always"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "always"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "always"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "always"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "always"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "always"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "always"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-https origin and swap-origin redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/iframe.meta/always/sharedworker-classic.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.meta/always/sharedworker-classic.http.html
new file mode 100644
index 0000000000..f9af6ab048
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/iframe.meta/always/sharedworker-classic.http.html
@@ -0,0 +1,65 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "always"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "sharedworker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for sharedworker-classic to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "always"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "sharedworker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for sharedworker-classic to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/iframe.meta/always/sharedworker-module.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.meta/always/sharedworker-module.http.html
new file mode 100644
index 0000000000..d20abe31a9
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/iframe.meta/always/sharedworker-module.http.html
@@ -0,0 +1,65 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "always"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "sharedworker-module",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for sharedworker-module to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "always"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "sharedworker-module",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for sharedworker-module to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/iframe.meta/always/worker-classic.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.meta/always/worker-classic.http.html
new file mode 100644
index 0000000000..9d2cbf8adf
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/iframe.meta/always/worker-classic.http.html
@@ -0,0 +1,65 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "always"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "worker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-classic to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "always"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "worker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-classic to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/iframe.meta/always/worker-module.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.meta/always/worker-module.http.html
new file mode 100644
index 0000000000..d8701d4ea3
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/iframe.meta/always/worker-module.http.html
@@ -0,0 +1,65 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "always"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "worker-module",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-module to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "always"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "worker-module",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-module to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/iframe.meta/always/xhr.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.meta/always/xhr.http.html
new file mode 100644
index 0000000000..e033f39fdc
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/iframe.meta/always/xhr.http.html
@@ -0,0 +1,275 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "always"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "always"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "always"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "always"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "always"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "always"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "always"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "always"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "always"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "always"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "always"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "always"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-https origin and swap-origin redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/iframe.meta/default/a-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.meta/default/a-tag.http.html
new file mode 100644
index 0000000000..ae680fcec0
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/iframe.meta/default/a-tag.http.html
@@ -0,0 +1,107 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "default"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "a-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for a-tag to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "default"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "a-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for a-tag to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "default"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "a-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for a-tag to same-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "default"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "a-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for a-tag to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/iframe.meta/default/fetch.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.meta/default/fetch.http.html
new file mode 100644
index 0000000000..22fa9ead9a
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/iframe.meta/default/fetch.http.html
@@ -0,0 +1,275 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "default"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for fetch to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "default"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for fetch to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "default"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for fetch to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "default"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for fetch to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "default"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for fetch to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "default"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for fetch to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "default"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for fetch to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "default"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for fetch to same-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "default"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for fetch to same-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "default"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for fetch to same-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "default"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "default"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/iframe.meta/default/iframe-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.meta/default/iframe-tag.http.html
new file mode 100644
index 0000000000..7fb374c8d1
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/iframe.meta/default/iframe-tag.http.html
@@ -0,0 +1,275 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "default"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for iframe-tag to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "default"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for iframe-tag to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "default"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for iframe-tag to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "default"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for iframe-tag to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "default"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for iframe-tag to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "default"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for iframe-tag to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "default"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for iframe-tag to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "default"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for iframe-tag to same-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "default"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for iframe-tag to same-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "default"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for iframe-tag to same-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "default"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "default"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/iframe.meta/default/img-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.meta/default/img-tag.http.html
new file mode 100644
index 0000000000..f6c6c530c5
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/iframe.meta/default/img-tag.http.html
@@ -0,0 +1,275 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "default"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for img-tag to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "default"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for img-tag to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "default"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for img-tag to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "default"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for img-tag to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "default"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for img-tag to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "default"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for img-tag to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "default"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for img-tag to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "default"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for img-tag to same-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "default"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for img-tag to same-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "default"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for img-tag to same-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "default"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "default"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/iframe.meta/default/script-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.meta/default/script-tag.http.html
new file mode 100644
index 0000000000..da1b5d8cae
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/iframe.meta/default/script-tag.http.html
@@ -0,0 +1,275 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "default"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for script-tag to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "default"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for script-tag to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "default"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for script-tag to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "default"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for script-tag to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "default"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for script-tag to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "default"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for script-tag to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "default"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for script-tag to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "default"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for script-tag to same-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "default"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for script-tag to same-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "default"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for script-tag to same-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "default"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "default"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/iframe.meta/default/sharedworker-classic.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.meta/default/sharedworker-classic.http.html
new file mode 100644
index 0000000000..4b82a771dc
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/iframe.meta/default/sharedworker-classic.http.html
@@ -0,0 +1,65 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "default"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "sharedworker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for sharedworker-classic to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "default"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "sharedworker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for sharedworker-classic to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/iframe.meta/default/sharedworker-module.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.meta/default/sharedworker-module.http.html
new file mode 100644
index 0000000000..19f1cf60d6
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/iframe.meta/default/sharedworker-module.http.html
@@ -0,0 +1,65 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "default"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "sharedworker-module",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for sharedworker-module to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "default"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "sharedworker-module",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for sharedworker-module to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/iframe.meta/default/worker-classic.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.meta/default/worker-classic.http.html
new file mode 100644
index 0000000000..2c19e4c054
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/iframe.meta/default/worker-classic.http.html
@@ -0,0 +1,65 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "default"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "worker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-classic to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "default"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "worker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-classic to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/iframe.meta/default/worker-module.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.meta/default/worker-module.http.html
new file mode 100644
index 0000000000..35c2a6fa7c
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/iframe.meta/default/worker-module.http.html
@@ -0,0 +1,65 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "default"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "worker-module",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-module to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "default"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "worker-module",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-module to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/iframe.meta/default/xhr.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.meta/default/xhr.http.html
new file mode 100644
index 0000000000..9e5f49f12d
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/iframe.meta/default/xhr.http.html
@@ -0,0 +1,275 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "default"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for xhr to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "default"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for xhr to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "default"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for xhr to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "default"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for xhr to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "default"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for xhr to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "default"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for xhr to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "default"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for xhr to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "default"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for xhr to same-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "default"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for xhr to same-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "default"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for xhr to same-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "default"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "default"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/iframe.meta/never/a-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.meta/never/a-tag.http.html
new file mode 100644
index 0000000000..e7b5d1b64f
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/iframe.meta/never/a-tag.http.html
@@ -0,0 +1,107 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "omitted",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "never"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "a-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for a-tag to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "never"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "a-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for a-tag to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "never"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "a-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for a-tag to same-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "never"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "a-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for a-tag to same-https origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/iframe.meta/never/fetch.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.meta/never/fetch.http.html
new file mode 100644
index 0000000000..faeee3f6c2
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/iframe.meta/never/fetch.http.html
@@ -0,0 +1,275 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "omitted",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "never"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for fetch to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "never"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for fetch to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "never"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for fetch to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "never"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for fetch to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "never"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for fetch to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "never"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for fetch to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "never"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for fetch to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "never"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for fetch to same-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "never"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for fetch to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "same-https",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "never"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for fetch to same-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "never"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for fetch to same-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "never"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for fetch to same-https origin and swap-origin redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/iframe.meta/never/iframe-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.meta/never/iframe-tag.http.html
new file mode 100644
index 0000000000..bb7e1d606b
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/iframe.meta/never/iframe-tag.http.html
@@ -0,0 +1,275 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "omitted",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "never"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for iframe-tag to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "never"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for iframe-tag to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "never"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for iframe-tag to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "never"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for iframe-tag to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "never"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for iframe-tag to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "never"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for iframe-tag to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "never"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for iframe-tag to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "never"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for iframe-tag to same-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "never"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for iframe-tag to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "same-https",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "never"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for iframe-tag to same-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "never"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for iframe-tag to same-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "never"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for iframe-tag to same-https origin and swap-origin redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/iframe.meta/never/img-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.meta/never/img-tag.http.html
new file mode 100644
index 0000000000..b2da662702
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/iframe.meta/never/img-tag.http.html
@@ -0,0 +1,275 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "omitted",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "never"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for img-tag to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "never"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for img-tag to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "never"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for img-tag to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "never"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for img-tag to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "never"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for img-tag to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "never"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for img-tag to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "never"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for img-tag to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "never"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for img-tag to same-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "never"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for img-tag to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "same-https",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "never"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for img-tag to same-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "never"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for img-tag to same-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "never"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for img-tag to same-https origin and swap-origin redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/iframe.meta/never/script-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.meta/never/script-tag.http.html
new file mode 100644
index 0000000000..a249520b24
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/iframe.meta/never/script-tag.http.html
@@ -0,0 +1,275 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "omitted",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "never"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for script-tag to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "never"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for script-tag to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "never"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for script-tag to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "never"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for script-tag to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "never"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for script-tag to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "never"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for script-tag to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "never"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for script-tag to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "never"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for script-tag to same-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "never"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for script-tag to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "same-https",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "never"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for script-tag to same-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "never"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for script-tag to same-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "never"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for script-tag to same-https origin and swap-origin redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/iframe.meta/never/sharedworker-classic.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.meta/never/sharedworker-classic.http.html
new file mode 100644
index 0000000000..374308e681
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/iframe.meta/never/sharedworker-classic.http.html
@@ -0,0 +1,65 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "omitted",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "never"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "sharedworker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for sharedworker-classic to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "never"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "sharedworker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for sharedworker-classic to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/iframe.meta/never/sharedworker-module.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.meta/never/sharedworker-module.http.html
new file mode 100644
index 0000000000..b02d886a34
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/iframe.meta/never/sharedworker-module.http.html
@@ -0,0 +1,65 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "omitted",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "never"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "sharedworker-module",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for sharedworker-module to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "never"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "sharedworker-module",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for sharedworker-module to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/iframe.meta/never/worker-classic.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.meta/never/worker-classic.http.html
new file mode 100644
index 0000000000..b3cad71141
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/iframe.meta/never/worker-classic.http.html
@@ -0,0 +1,65 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "omitted",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "never"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "worker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for worker-classic to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "never"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "worker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for worker-classic to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/iframe.meta/never/worker-module.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.meta/never/worker-module.http.html
new file mode 100644
index 0000000000..d87a97bd06
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/iframe.meta/never/worker-module.http.html
@@ -0,0 +1,65 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "omitted",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "never"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "worker-module",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for worker-module to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "never"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "worker-module",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for worker-module to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/iframe.meta/never/xhr.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.meta/never/xhr.http.html
new file mode 100644
index 0000000000..b11b3acf3d
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/iframe.meta/never/xhr.http.html
@@ -0,0 +1,275 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "omitted",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "never"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for xhr to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "never"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for xhr to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "never"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for xhr to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "never"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for xhr to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "never"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for xhr to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "never"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for xhr to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "never"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for xhr to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "never"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for xhr to same-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "never"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for xhr to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "same-https",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "never"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for xhr to same-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "never"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for xhr to same-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "never"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for xhr to same-https origin and swap-origin redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/iframe.meta/no-referrer-when-downgrade/a-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.meta/no-referrer-when-downgrade/a-tag.http.html
new file mode 100644
index 0000000000..deb63be21a
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/iframe.meta/no-referrer-when-downgrade/a-tag.http.html
@@ -0,0 +1,107 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "a-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for a-tag to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "a-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for a-tag to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "a-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for a-tag to same-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "a-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for a-tag to same-https origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/iframe.meta/no-referrer-when-downgrade/fetch.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.meta/no-referrer-when-downgrade/fetch.http.html
new file mode 100644
index 0000000000..1bbe96a03f
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/iframe.meta/no-referrer-when-downgrade/fetch.http.html
@@ -0,0 +1,275 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-https origin and swap-origin redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/iframe.meta/no-referrer-when-downgrade/iframe-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.meta/no-referrer-when-downgrade/iframe-tag.http.html
new file mode 100644
index 0000000000..bd12e55ae2
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/iframe.meta/no-referrer-when-downgrade/iframe-tag.http.html
@@ -0,0 +1,275 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-https origin and swap-origin redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/iframe.meta/no-referrer-when-downgrade/img-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.meta/no-referrer-when-downgrade/img-tag.http.html
new file mode 100644
index 0000000000..0c677d87ea
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/iframe.meta/no-referrer-when-downgrade/img-tag.http.html
@@ -0,0 +1,275 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-https origin and swap-origin redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/iframe.meta/no-referrer-when-downgrade/script-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.meta/no-referrer-when-downgrade/script-tag.http.html
new file mode 100644
index 0000000000..89c885b592
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/iframe.meta/no-referrer-when-downgrade/script-tag.http.html
@@ -0,0 +1,275 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-https origin and swap-origin redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/iframe.meta/no-referrer-when-downgrade/sharedworker-classic.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.meta/no-referrer-when-downgrade/sharedworker-classic.http.html
new file mode 100644
index 0000000000..95adb13832
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/iframe.meta/no-referrer-when-downgrade/sharedworker-classic.http.html
@@ -0,0 +1,65 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "sharedworker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for sharedworker-classic to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "sharedworker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for sharedworker-classic to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/iframe.meta/no-referrer-when-downgrade/sharedworker-module.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.meta/no-referrer-when-downgrade/sharedworker-module.http.html
new file mode 100644
index 0000000000..cf3974a868
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/iframe.meta/no-referrer-when-downgrade/sharedworker-module.http.html
@@ -0,0 +1,65 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "sharedworker-module",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for sharedworker-module to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "sharedworker-module",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for sharedworker-module to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/iframe.meta/no-referrer-when-downgrade/worker-classic.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.meta/no-referrer-when-downgrade/worker-classic.http.html
new file mode 100644
index 0000000000..4b66b592c0
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/iframe.meta/no-referrer-when-downgrade/worker-classic.http.html
@@ -0,0 +1,65 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "worker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-classic to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "worker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-classic to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/iframe.meta/no-referrer-when-downgrade/worker-module.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.meta/no-referrer-when-downgrade/worker-module.http.html
new file mode 100644
index 0000000000..7cbd326507
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/iframe.meta/no-referrer-when-downgrade/worker-module.http.html
@@ -0,0 +1,65 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "worker-module",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-module to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "worker-module",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-module to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/iframe.meta/no-referrer-when-downgrade/xhr.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.meta/no-referrer-when-downgrade/xhr.http.html
new file mode 100644
index 0000000000..994f33f707
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/iframe.meta/no-referrer-when-downgrade/xhr.http.html
@@ -0,0 +1,275 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-https origin and swap-origin redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/iframe.meta/no-referrer/a-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.meta/no-referrer/a-tag.http.html
new file mode 100644
index 0000000000..83efe8b9b0
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/iframe.meta/no-referrer/a-tag.http.html
@@ -0,0 +1,107 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "omitted",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "a-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for a-tag to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "a-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for a-tag to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "a-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for a-tag to same-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "a-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for a-tag to same-https origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/iframe.meta/no-referrer/fetch.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.meta/no-referrer/fetch.http.html
new file mode 100644
index 0000000000..b01056da7d
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/iframe.meta/no-referrer/fetch.http.html
@@ -0,0 +1,275 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "omitted",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for fetch to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for fetch to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for fetch to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for fetch to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for fetch to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for fetch to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for fetch to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for fetch to same-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for fetch to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "same-https",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for fetch to same-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for fetch to same-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for fetch to same-https origin and swap-origin redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/iframe.meta/no-referrer/iframe-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.meta/no-referrer/iframe-tag.http.html
new file mode 100644
index 0000000000..15a8b4b7de
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/iframe.meta/no-referrer/iframe-tag.http.html
@@ -0,0 +1,275 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "omitted",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for iframe-tag to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for iframe-tag to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for iframe-tag to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for iframe-tag to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for iframe-tag to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for iframe-tag to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for iframe-tag to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for iframe-tag to same-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for iframe-tag to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "same-https",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for iframe-tag to same-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for iframe-tag to same-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for iframe-tag to same-https origin and swap-origin redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/iframe.meta/no-referrer/img-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.meta/no-referrer/img-tag.http.html
new file mode 100644
index 0000000000..16682a9983
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/iframe.meta/no-referrer/img-tag.http.html
@@ -0,0 +1,275 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "omitted",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for img-tag to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for img-tag to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for img-tag to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for img-tag to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for img-tag to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for img-tag to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for img-tag to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for img-tag to same-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for img-tag to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "same-https",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for img-tag to same-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for img-tag to same-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for img-tag to same-https origin and swap-origin redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/iframe.meta/no-referrer/script-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.meta/no-referrer/script-tag.http.html
new file mode 100644
index 0000000000..41d4e9053d
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/iframe.meta/no-referrer/script-tag.http.html
@@ -0,0 +1,275 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "omitted",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for script-tag to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for script-tag to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for script-tag to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for script-tag to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for script-tag to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for script-tag to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for script-tag to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for script-tag to same-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for script-tag to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "same-https",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for script-tag to same-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for script-tag to same-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for script-tag to same-https origin and swap-origin redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/iframe.meta/no-referrer/sharedworker-classic.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.meta/no-referrer/sharedworker-classic.http.html
new file mode 100644
index 0000000000..00f15c8eed
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/iframe.meta/no-referrer/sharedworker-classic.http.html
@@ -0,0 +1,65 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "omitted",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "sharedworker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for sharedworker-classic to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "sharedworker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for sharedworker-classic to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/iframe.meta/no-referrer/sharedworker-module.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.meta/no-referrer/sharedworker-module.http.html
new file mode 100644
index 0000000000..fb40728d89
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/iframe.meta/no-referrer/sharedworker-module.http.html
@@ -0,0 +1,65 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "omitted",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "sharedworker-module",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for sharedworker-module to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "sharedworker-module",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for sharedworker-module to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/iframe.meta/no-referrer/worker-classic.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.meta/no-referrer/worker-classic.http.html
new file mode 100644
index 0000000000..6cb42b49b0
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/iframe.meta/no-referrer/worker-classic.http.html
@@ -0,0 +1,65 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "omitted",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "worker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for worker-classic to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "worker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for worker-classic to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/iframe.meta/no-referrer/worker-module.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.meta/no-referrer/worker-module.http.html
new file mode 100644
index 0000000000..660e8a16e7
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/iframe.meta/no-referrer/worker-module.http.html
@@ -0,0 +1,65 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "omitted",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "worker-module",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for worker-module to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "worker-module",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for worker-module to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/iframe.meta/no-referrer/xhr.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.meta/no-referrer/xhr.http.html
new file mode 100644
index 0000000000..208e7ad99d
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/iframe.meta/no-referrer/xhr.http.html
@@ -0,0 +1,275 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "omitted",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for xhr to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for xhr to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for xhr to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for xhr to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for xhr to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for xhr to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for xhr to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for xhr to same-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for xhr to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "same-https",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for xhr to same-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for xhr to same-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for xhr to same-https origin and swap-origin redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/iframe.meta/origin-when-cross-origin/a-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.meta/origin-when-cross-origin/a-tag.http.html
new file mode 100644
index 0000000000..891ca32754
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/iframe.meta/origin-when-cross-origin/a-tag.http.html
@@ -0,0 +1,107 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "a-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for a-tag to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "a-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for a-tag to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "a-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for a-tag to same-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "a-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for a-tag to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/iframe.meta/origin-when-cross-origin/fetch.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.meta/origin-when-cross-origin/fetch.http.html
new file mode 100644
index 0000000000..e6d25e441e
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/iframe.meta/origin-when-cross-origin/fetch.http.html
@@ -0,0 +1,275 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for fetch to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for fetch to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for fetch to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for fetch to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for fetch to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for fetch to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for fetch to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for fetch to same-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for fetch to same-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for fetch to same-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/iframe.meta/origin-when-cross-origin/iframe-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.meta/origin-when-cross-origin/iframe-tag.http.html
new file mode 100644
index 0000000000..29fef75d8d
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/iframe.meta/origin-when-cross-origin/iframe-tag.http.html
@@ -0,0 +1,275 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for iframe-tag to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for iframe-tag to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for iframe-tag to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for iframe-tag to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for iframe-tag to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for iframe-tag to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for iframe-tag to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for iframe-tag to same-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for iframe-tag to same-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for iframe-tag to same-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/iframe.meta/origin-when-cross-origin/img-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.meta/origin-when-cross-origin/img-tag.http.html
new file mode 100644
index 0000000000..9cf05a057f
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/iframe.meta/origin-when-cross-origin/img-tag.http.html
@@ -0,0 +1,275 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for img-tag to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for img-tag to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for img-tag to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for img-tag to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for img-tag to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for img-tag to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for img-tag to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for img-tag to same-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for img-tag to same-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for img-tag to same-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/iframe.meta/origin-when-cross-origin/script-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.meta/origin-when-cross-origin/script-tag.http.html
new file mode 100644
index 0000000000..a540a3bafe
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/iframe.meta/origin-when-cross-origin/script-tag.http.html
@@ -0,0 +1,275 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for script-tag to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for script-tag to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for script-tag to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for script-tag to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for script-tag to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for script-tag to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for script-tag to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for script-tag to same-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for script-tag to same-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for script-tag to same-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/iframe.meta/origin-when-cross-origin/sharedworker-classic.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.meta/origin-when-cross-origin/sharedworker-classic.http.html
new file mode 100644
index 0000000000..43c13d83eb
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/iframe.meta/origin-when-cross-origin/sharedworker-classic.http.html
@@ -0,0 +1,65 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "sharedworker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for sharedworker-classic to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "sharedworker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for sharedworker-classic to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/iframe.meta/origin-when-cross-origin/sharedworker-module.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.meta/origin-when-cross-origin/sharedworker-module.http.html
new file mode 100644
index 0000000000..ddfd6426f3
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/iframe.meta/origin-when-cross-origin/sharedworker-module.http.html
@@ -0,0 +1,65 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "sharedworker-module",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for sharedworker-module to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "sharedworker-module",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for sharedworker-module to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/iframe.meta/origin-when-cross-origin/worker-classic.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.meta/origin-when-cross-origin/worker-classic.http.html
new file mode 100644
index 0000000000..241dc980f4
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/iframe.meta/origin-when-cross-origin/worker-classic.http.html
@@ -0,0 +1,65 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "worker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-classic to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "worker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-classic to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/iframe.meta/origin-when-cross-origin/worker-module.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.meta/origin-when-cross-origin/worker-module.http.html
new file mode 100644
index 0000000000..e147f59bf5
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/iframe.meta/origin-when-cross-origin/worker-module.http.html
@@ -0,0 +1,65 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "worker-module",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-module to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "worker-module",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-module to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/iframe.meta/origin-when-cross-origin/xhr.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.meta/origin-when-cross-origin/xhr.http.html
new file mode 100644
index 0000000000..bd9f0b2b14
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/iframe.meta/origin-when-cross-origin/xhr.http.html
@@ -0,0 +1,275 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for xhr to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for xhr to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for xhr to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for xhr to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for xhr to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for xhr to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for xhr to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for xhr to same-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for xhr to same-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for xhr to same-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/iframe.meta/origin-when-crossorigin/a-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.meta/origin-when-crossorigin/a-tag.http.html
new file mode 100644
index 0000000000..f1459d1766
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/iframe.meta/origin-when-crossorigin/a-tag.http.html
@@ -0,0 +1,107 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin-when-crossorigin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "a-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for a-tag to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin-when-crossorigin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "a-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for a-tag to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin-when-crossorigin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "a-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for a-tag to same-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin-when-crossorigin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "a-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for a-tag to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/iframe.meta/origin-when-crossorigin/fetch.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.meta/origin-when-crossorigin/fetch.http.html
new file mode 100644
index 0000000000..9f041993b8
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/iframe.meta/origin-when-crossorigin/fetch.http.html
@@ -0,0 +1,275 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin-when-crossorigin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for fetch to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin-when-crossorigin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for fetch to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin-when-crossorigin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for fetch to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin-when-crossorigin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for fetch to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin-when-crossorigin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for fetch to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin-when-crossorigin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for fetch to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin-when-crossorigin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for fetch to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin-when-crossorigin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for fetch to same-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin-when-crossorigin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for fetch to same-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin-when-crossorigin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for fetch to same-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin-when-crossorigin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin-when-crossorigin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/iframe.meta/origin-when-crossorigin/iframe-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.meta/origin-when-crossorigin/iframe-tag.http.html
new file mode 100644
index 0000000000..d667fa4676
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/iframe.meta/origin-when-crossorigin/iframe-tag.http.html
@@ -0,0 +1,275 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin-when-crossorigin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for iframe-tag to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin-when-crossorigin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for iframe-tag to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin-when-crossorigin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for iframe-tag to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin-when-crossorigin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for iframe-tag to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin-when-crossorigin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for iframe-tag to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin-when-crossorigin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for iframe-tag to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin-when-crossorigin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for iframe-tag to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin-when-crossorigin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for iframe-tag to same-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin-when-crossorigin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for iframe-tag to same-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin-when-crossorigin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for iframe-tag to same-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin-when-crossorigin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin-when-crossorigin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/iframe.meta/origin-when-crossorigin/img-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.meta/origin-when-crossorigin/img-tag.http.html
new file mode 100644
index 0000000000..3e19c51539
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/iframe.meta/origin-when-crossorigin/img-tag.http.html
@@ -0,0 +1,275 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin-when-crossorigin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for img-tag to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin-when-crossorigin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for img-tag to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin-when-crossorigin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for img-tag to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin-when-crossorigin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for img-tag to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin-when-crossorigin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for img-tag to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin-when-crossorigin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for img-tag to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin-when-crossorigin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for img-tag to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin-when-crossorigin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for img-tag to same-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin-when-crossorigin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for img-tag to same-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin-when-crossorigin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for img-tag to same-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin-when-crossorigin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin-when-crossorigin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/iframe.meta/origin-when-crossorigin/script-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.meta/origin-when-crossorigin/script-tag.http.html
new file mode 100644
index 0000000000..27793d0dcd
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/iframe.meta/origin-when-crossorigin/script-tag.http.html
@@ -0,0 +1,275 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin-when-crossorigin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for script-tag to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin-when-crossorigin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for script-tag to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin-when-crossorigin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for script-tag to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin-when-crossorigin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for script-tag to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin-when-crossorigin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for script-tag to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin-when-crossorigin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for script-tag to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin-when-crossorigin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for script-tag to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin-when-crossorigin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for script-tag to same-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin-when-crossorigin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for script-tag to same-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin-when-crossorigin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for script-tag to same-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin-when-crossorigin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin-when-crossorigin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/iframe.meta/origin-when-crossorigin/sharedworker-classic.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.meta/origin-when-crossorigin/sharedworker-classic.http.html
new file mode 100644
index 0000000000..156afd1808
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/iframe.meta/origin-when-crossorigin/sharedworker-classic.http.html
@@ -0,0 +1,65 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin-when-crossorigin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "sharedworker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for sharedworker-classic to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin-when-crossorigin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "sharedworker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for sharedworker-classic to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/iframe.meta/origin-when-crossorigin/sharedworker-module.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.meta/origin-when-crossorigin/sharedworker-module.http.html
new file mode 100644
index 0000000000..0cf897ac1e
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/iframe.meta/origin-when-crossorigin/sharedworker-module.http.html
@@ -0,0 +1,65 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin-when-crossorigin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "sharedworker-module",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for sharedworker-module to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin-when-crossorigin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "sharedworker-module",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for sharedworker-module to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/iframe.meta/origin-when-crossorigin/worker-classic.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.meta/origin-when-crossorigin/worker-classic.http.html
new file mode 100644
index 0000000000..9ec0e33e85
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/iframe.meta/origin-when-crossorigin/worker-classic.http.html
@@ -0,0 +1,65 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin-when-crossorigin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "worker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-classic to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin-when-crossorigin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "worker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-classic to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/iframe.meta/origin-when-crossorigin/worker-module.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.meta/origin-when-crossorigin/worker-module.http.html
new file mode 100644
index 0000000000..c59dc431bd
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/iframe.meta/origin-when-crossorigin/worker-module.http.html
@@ -0,0 +1,65 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin-when-crossorigin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "worker-module",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-module to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin-when-crossorigin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "worker-module",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-module to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/iframe.meta/origin-when-crossorigin/xhr.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.meta/origin-when-crossorigin/xhr.http.html
new file mode 100644
index 0000000000..bdd1396c27
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/iframe.meta/origin-when-crossorigin/xhr.http.html
@@ -0,0 +1,275 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin-when-crossorigin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for xhr to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin-when-crossorigin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for xhr to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin-when-crossorigin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for xhr to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin-when-crossorigin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for xhr to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin-when-crossorigin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for xhr to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin-when-crossorigin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for xhr to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin-when-crossorigin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for xhr to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin-when-crossorigin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for xhr to same-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin-when-crossorigin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for xhr to same-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin-when-crossorigin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for xhr to same-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin-when-crossorigin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin-when-crossorigin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/iframe.meta/origin/a-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.meta/origin/a-tag.http.html
new file mode 100644
index 0000000000..62d0f44803
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/iframe.meta/origin/a-tag.http.html
@@ -0,0 +1,107 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "a-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for a-tag to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "a-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for a-tag to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "a-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for a-tag to same-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "a-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for a-tag to same-https origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/iframe.meta/origin/fetch.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.meta/origin/fetch.http.html
new file mode 100644
index 0000000000..7f9be9aede
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/iframe.meta/origin/fetch.http.html
@@ -0,0 +1,275 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for fetch to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for fetch to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for fetch to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for fetch to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for fetch to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for fetch to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for fetch to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for fetch to same-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for fetch to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for fetch to same-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for fetch to same-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for fetch to same-https origin and swap-origin redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/iframe.meta/origin/iframe-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.meta/origin/iframe-tag.http.html
new file mode 100644
index 0000000000..2c4e96aa9b
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/iframe.meta/origin/iframe-tag.http.html
@@ -0,0 +1,275 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for iframe-tag to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for iframe-tag to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for iframe-tag to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for iframe-tag to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for iframe-tag to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for iframe-tag to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for iframe-tag to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for iframe-tag to same-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for iframe-tag to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for iframe-tag to same-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for iframe-tag to same-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for iframe-tag to same-https origin and swap-origin redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/iframe.meta/origin/img-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.meta/origin/img-tag.http.html
new file mode 100644
index 0000000000..77839c9a51
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/iframe.meta/origin/img-tag.http.html
@@ -0,0 +1,275 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for img-tag to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for img-tag to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for img-tag to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for img-tag to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for img-tag to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for img-tag to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for img-tag to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for img-tag to same-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for img-tag to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for img-tag to same-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for img-tag to same-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for img-tag to same-https origin and swap-origin redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/iframe.meta/origin/script-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.meta/origin/script-tag.http.html
new file mode 100644
index 0000000000..dae76da803
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/iframe.meta/origin/script-tag.http.html
@@ -0,0 +1,275 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for script-tag to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for script-tag to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for script-tag to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for script-tag to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for script-tag to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for script-tag to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for script-tag to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for script-tag to same-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for script-tag to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for script-tag to same-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for script-tag to same-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for script-tag to same-https origin and swap-origin redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/iframe.meta/origin/sharedworker-classic.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.meta/origin/sharedworker-classic.http.html
new file mode 100644
index 0000000000..0133ac9786
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/iframe.meta/origin/sharedworker-classic.http.html
@@ -0,0 +1,65 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "origin",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "sharedworker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for sharedworker-classic to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "sharedworker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for sharedworker-classic to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/iframe.meta/origin/sharedworker-module.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.meta/origin/sharedworker-module.http.html
new file mode 100644
index 0000000000..64ee46076f
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/iframe.meta/origin/sharedworker-module.http.html
@@ -0,0 +1,65 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "origin",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "sharedworker-module",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for sharedworker-module to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "sharedworker-module",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for sharedworker-module to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/iframe.meta/origin/worker-classic.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.meta/origin/worker-classic.http.html
new file mode 100644
index 0000000000..63805dab89
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/iframe.meta/origin/worker-classic.http.html
@@ -0,0 +1,65 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "origin",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "worker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for worker-classic to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "worker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for worker-classic to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/iframe.meta/origin/worker-module.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.meta/origin/worker-module.http.html
new file mode 100644
index 0000000000..0ebd247241
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/iframe.meta/origin/worker-module.http.html
@@ -0,0 +1,65 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "origin",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "worker-module",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for worker-module to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "worker-module",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for worker-module to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/iframe.meta/origin/xhr.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.meta/origin/xhr.http.html
new file mode 100644
index 0000000000..6a4323f310
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/iframe.meta/origin/xhr.http.html
@@ -0,0 +1,275 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for xhr to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for xhr to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for xhr to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for xhr to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for xhr to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for xhr to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for xhr to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for xhr to same-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for xhr to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for xhr to same-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for xhr to same-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for xhr to same-https origin and swap-origin redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/iframe.meta/same-origin/a-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.meta/same-origin/a-tag.http.html
new file mode 100644
index 0000000000..5e50fe89cc
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/iframe.meta/same-origin/a-tag.http.html
@@ -0,0 +1,86 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "omitted",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "same-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "a-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for a-tag to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "same-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "a-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for a-tag to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "same-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "a-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for a-tag to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/iframe.meta/same-origin/fetch.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.meta/same-origin/fetch.http.html
new file mode 100644
index 0000000000..f5a1f7d1b4
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/iframe.meta/same-origin/fetch.http.html
@@ -0,0 +1,233 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "omitted",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "same-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for fetch to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "same-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for fetch to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "same-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for fetch to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "same-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for fetch to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "same-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for fetch to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "same-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for fetch to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "same-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for fetch to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "same-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for fetch to same-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "same-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "same-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/iframe.meta/same-origin/iframe-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.meta/same-origin/iframe-tag.http.html
new file mode 100644
index 0000000000..66e0f443bb
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/iframe.meta/same-origin/iframe-tag.http.html
@@ -0,0 +1,233 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "omitted",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "same-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for iframe-tag to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "same-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for iframe-tag to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "same-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for iframe-tag to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "same-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for iframe-tag to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "same-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for iframe-tag to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "same-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for iframe-tag to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "same-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for iframe-tag to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "same-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for iframe-tag to same-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "same-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "same-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/iframe.meta/same-origin/img-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.meta/same-origin/img-tag.http.html
new file mode 100644
index 0000000000..45bacb839c
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/iframe.meta/same-origin/img-tag.http.html
@@ -0,0 +1,233 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "omitted",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "same-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for img-tag to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "same-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for img-tag to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "same-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for img-tag to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "same-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for img-tag to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "same-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for img-tag to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "same-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for img-tag to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "same-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for img-tag to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "same-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for img-tag to same-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "same-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "same-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/iframe.meta/same-origin/script-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.meta/same-origin/script-tag.http.html
new file mode 100644
index 0000000000..93217fd44f
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/iframe.meta/same-origin/script-tag.http.html
@@ -0,0 +1,233 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "omitted",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "same-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for script-tag to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "same-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for script-tag to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "same-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for script-tag to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "same-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for script-tag to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "same-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for script-tag to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "same-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for script-tag to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "same-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for script-tag to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "same-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for script-tag to same-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "same-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "same-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/iframe.meta/same-origin/sharedworker-classic.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.meta/same-origin/sharedworker-classic.http.html
new file mode 100644
index 0000000000..f6331974b7
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/iframe.meta/same-origin/sharedworker-classic.http.html
@@ -0,0 +1,65 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "same-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "sharedworker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for sharedworker-classic to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "same-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "sharedworker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for sharedworker-classic to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/iframe.meta/same-origin/sharedworker-module.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.meta/same-origin/sharedworker-module.http.html
new file mode 100644
index 0000000000..98f95f3e3a
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/iframe.meta/same-origin/sharedworker-module.http.html
@@ -0,0 +1,65 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "same-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "sharedworker-module",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for sharedworker-module to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "same-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "sharedworker-module",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for sharedworker-module to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/iframe.meta/same-origin/worker-classic.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.meta/same-origin/worker-classic.http.html
new file mode 100644
index 0000000000..507da7d135
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/iframe.meta/same-origin/worker-classic.http.html
@@ -0,0 +1,65 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "same-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "worker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-classic to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "same-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "worker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-classic to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/iframe.meta/same-origin/worker-module.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.meta/same-origin/worker-module.http.html
new file mode 100644
index 0000000000..e7ad360c75
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/iframe.meta/same-origin/worker-module.http.html
@@ -0,0 +1,65 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "same-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "worker-module",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-module to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "same-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "worker-module",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-module to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/iframe.meta/same-origin/xhr.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.meta/same-origin/xhr.http.html
new file mode 100644
index 0000000000..d055d5219d
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/iframe.meta/same-origin/xhr.http.html
@@ -0,0 +1,233 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "omitted",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "same-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for xhr to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "same-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for xhr to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "same-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for xhr to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "same-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for xhr to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "same-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for xhr to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "same-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for xhr to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "same-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for xhr to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "same-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for xhr to same-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "same-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "same-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/iframe.meta/strict-origin-when-cross-origin/a-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.meta/strict-origin-when-cross-origin/a-tag.http.html
new file mode 100644
index 0000000000..39e014a2a3
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/iframe.meta/strict-origin-when-cross-origin/a-tag.http.html
@@ -0,0 +1,107 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "a-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for a-tag to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "a-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for a-tag to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "a-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for a-tag to same-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "a-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for a-tag to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/iframe.meta/strict-origin-when-cross-origin/fetch.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.meta/strict-origin-when-cross-origin/fetch.http.html
new file mode 100644
index 0000000000..4d755203cb
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/iframe.meta/strict-origin-when-cross-origin/fetch.http.html
@@ -0,0 +1,275 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for fetch to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for fetch to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for fetch to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for fetch to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for fetch to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for fetch to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for fetch to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for fetch to same-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for fetch to same-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for fetch to same-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/iframe.meta/strict-origin-when-cross-origin/iframe-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.meta/strict-origin-when-cross-origin/iframe-tag.http.html
new file mode 100644
index 0000000000..24f7501a52
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/iframe.meta/strict-origin-when-cross-origin/iframe-tag.http.html
@@ -0,0 +1,275 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for iframe-tag to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for iframe-tag to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for iframe-tag to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for iframe-tag to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for iframe-tag to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for iframe-tag to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for iframe-tag to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for iframe-tag to same-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for iframe-tag to same-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for iframe-tag to same-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/iframe.meta/strict-origin-when-cross-origin/img-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.meta/strict-origin-when-cross-origin/img-tag.http.html
new file mode 100644
index 0000000000..bfca98186a
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/iframe.meta/strict-origin-when-cross-origin/img-tag.http.html
@@ -0,0 +1,275 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for img-tag to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for img-tag to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for img-tag to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for img-tag to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for img-tag to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for img-tag to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for img-tag to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for img-tag to same-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for img-tag to same-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for img-tag to same-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/iframe.meta/strict-origin-when-cross-origin/script-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.meta/strict-origin-when-cross-origin/script-tag.http.html
new file mode 100644
index 0000000000..9439b38c6b
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/iframe.meta/strict-origin-when-cross-origin/script-tag.http.html
@@ -0,0 +1,275 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for script-tag to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for script-tag to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for script-tag to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for script-tag to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for script-tag to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for script-tag to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for script-tag to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for script-tag to same-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for script-tag to same-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for script-tag to same-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/iframe.meta/strict-origin-when-cross-origin/sharedworker-classic.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.meta/strict-origin-when-cross-origin/sharedworker-classic.http.html
new file mode 100644
index 0000000000..e9fce3f6ae
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/iframe.meta/strict-origin-when-cross-origin/sharedworker-classic.http.html
@@ -0,0 +1,65 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "sharedworker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for sharedworker-classic to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "sharedworker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for sharedworker-classic to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/iframe.meta/strict-origin-when-cross-origin/sharedworker-module.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.meta/strict-origin-when-cross-origin/sharedworker-module.http.html
new file mode 100644
index 0000000000..5eedb0e5ec
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/iframe.meta/strict-origin-when-cross-origin/sharedworker-module.http.html
@@ -0,0 +1,65 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "sharedworker-module",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for sharedworker-module to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "sharedworker-module",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for sharedworker-module to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/iframe.meta/strict-origin-when-cross-origin/worker-classic.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.meta/strict-origin-when-cross-origin/worker-classic.http.html
new file mode 100644
index 0000000000..94056e21e9
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/iframe.meta/strict-origin-when-cross-origin/worker-classic.http.html
@@ -0,0 +1,65 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "worker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-classic to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "worker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-classic to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/iframe.meta/strict-origin-when-cross-origin/worker-module.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.meta/strict-origin-when-cross-origin/worker-module.http.html
new file mode 100644
index 0000000000..ba84318dce
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/iframe.meta/strict-origin-when-cross-origin/worker-module.http.html
@@ -0,0 +1,65 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "worker-module",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-module to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "worker-module",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-module to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/iframe.meta/strict-origin-when-cross-origin/xhr.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.meta/strict-origin-when-cross-origin/xhr.http.html
new file mode 100644
index 0000000000..4a6528a837
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/iframe.meta/strict-origin-when-cross-origin/xhr.http.html
@@ -0,0 +1,275 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for xhr to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for xhr to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for xhr to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for xhr to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for xhr to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for xhr to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for xhr to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for xhr to same-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for xhr to same-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for xhr to same-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/iframe.meta/strict-origin/a-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.meta/strict-origin/a-tag.http.html
new file mode 100644
index 0000000000..0bb27ab203
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/iframe.meta/strict-origin/a-tag.http.html
@@ -0,0 +1,107 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "a-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for a-tag to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "a-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for a-tag to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "a-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for a-tag to same-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "a-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for a-tag to same-https origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/iframe.meta/strict-origin/fetch.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.meta/strict-origin/fetch.http.html
new file mode 100644
index 0000000000..8c87e439b7
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/iframe.meta/strict-origin/fetch.http.html
@@ -0,0 +1,275 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for fetch to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for fetch to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for fetch to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for fetch to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for fetch to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for fetch to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for fetch to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for fetch to same-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for fetch to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for fetch to same-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for fetch to same-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for fetch to same-https origin and swap-origin redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/iframe.meta/strict-origin/iframe-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.meta/strict-origin/iframe-tag.http.html
new file mode 100644
index 0000000000..2d01d0d361
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/iframe.meta/strict-origin/iframe-tag.http.html
@@ -0,0 +1,275 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for iframe-tag to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for iframe-tag to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for iframe-tag to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for iframe-tag to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for iframe-tag to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for iframe-tag to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for iframe-tag to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for iframe-tag to same-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for iframe-tag to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for iframe-tag to same-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for iframe-tag to same-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for iframe-tag to same-https origin and swap-origin redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/iframe.meta/strict-origin/img-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.meta/strict-origin/img-tag.http.html
new file mode 100644
index 0000000000..9d1d14001d
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/iframe.meta/strict-origin/img-tag.http.html
@@ -0,0 +1,275 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for img-tag to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for img-tag to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for img-tag to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for img-tag to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for img-tag to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for img-tag to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for img-tag to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for img-tag to same-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for img-tag to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for img-tag to same-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for img-tag to same-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for img-tag to same-https origin and swap-origin redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/iframe.meta/strict-origin/script-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.meta/strict-origin/script-tag.http.html
new file mode 100644
index 0000000000..3f7449f610
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/iframe.meta/strict-origin/script-tag.http.html
@@ -0,0 +1,275 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for script-tag to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for script-tag to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for script-tag to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for script-tag to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for script-tag to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for script-tag to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for script-tag to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for script-tag to same-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for script-tag to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for script-tag to same-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for script-tag to same-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for script-tag to same-https origin and swap-origin redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/iframe.meta/strict-origin/sharedworker-classic.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.meta/strict-origin/sharedworker-classic.http.html
new file mode 100644
index 0000000000..53ac6fa0b5
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/iframe.meta/strict-origin/sharedworker-classic.http.html
@@ -0,0 +1,65 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "origin",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "sharedworker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for sharedworker-classic to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "sharedworker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for sharedworker-classic to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/iframe.meta/strict-origin/sharedworker-module.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.meta/strict-origin/sharedworker-module.http.html
new file mode 100644
index 0000000000..e177c83ca3
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/iframe.meta/strict-origin/sharedworker-module.http.html
@@ -0,0 +1,65 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "origin",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "sharedworker-module",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for sharedworker-module to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "sharedworker-module",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for sharedworker-module to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/iframe.meta/strict-origin/worker-classic.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.meta/strict-origin/worker-classic.http.html
new file mode 100644
index 0000000000..a444e9c7eb
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/iframe.meta/strict-origin/worker-classic.http.html
@@ -0,0 +1,65 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "origin",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "worker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for worker-classic to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "worker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for worker-classic to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/iframe.meta/strict-origin/worker-module.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.meta/strict-origin/worker-module.http.html
new file mode 100644
index 0000000000..fd10693da1
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/iframe.meta/strict-origin/worker-module.http.html
@@ -0,0 +1,65 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "origin",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "worker-module",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for worker-module to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "worker-module",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for worker-module to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/iframe.meta/strict-origin/xhr.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.meta/strict-origin/xhr.http.html
new file mode 100644
index 0000000000..0cf1f23011
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/iframe.meta/strict-origin/xhr.http.html
@@ -0,0 +1,275 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for xhr to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for xhr to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for xhr to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for xhr to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for xhr to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for xhr to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for xhr to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for xhr to same-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for xhr to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for xhr to same-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for xhr to same-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for xhr to same-https origin and swap-origin redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/iframe.meta/unsafe-url/a-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.meta/unsafe-url/a-tag.http.html
new file mode 100644
index 0000000000..64cec3d0cf
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/iframe.meta/unsafe-url/a-tag.http.html
@@ -0,0 +1,107 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="no-referrer">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "a-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for a-tag to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "a-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for a-tag to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "a-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for a-tag to same-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "a-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for a-tag to same-https origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/iframe.meta/unsafe-url/fetch.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.meta/unsafe-url/fetch.http.html
new file mode 100644
index 0000000000..084ed268e1
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/iframe.meta/unsafe-url/fetch.http.html
@@ -0,0 +1,275 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="no-referrer">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-https origin and swap-origin redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/iframe.meta/unsafe-url/iframe-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.meta/unsafe-url/iframe-tag.http.html
new file mode 100644
index 0000000000..a4d49315e5
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/iframe.meta/unsafe-url/iframe-tag.http.html
@@ -0,0 +1,275 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="no-referrer">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-https origin and swap-origin redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/iframe.meta/unsafe-url/img-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.meta/unsafe-url/img-tag.http.html
new file mode 100644
index 0000000000..b318a37f90
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/iframe.meta/unsafe-url/img-tag.http.html
@@ -0,0 +1,275 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="no-referrer">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-https origin and swap-origin redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/iframe.meta/unsafe-url/script-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.meta/unsafe-url/script-tag.http.html
new file mode 100644
index 0000000000..90ace4d25e
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/iframe.meta/unsafe-url/script-tag.http.html
@@ -0,0 +1,275 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="no-referrer">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-https origin and swap-origin redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/iframe.meta/unsafe-url/sharedworker-classic.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.meta/unsafe-url/sharedworker-classic.http.html
new file mode 100644
index 0000000000..03d5c1fb71
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/iframe.meta/unsafe-url/sharedworker-classic.http.html
@@ -0,0 +1,65 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="no-referrer">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "sharedworker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for sharedworker-classic to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "sharedworker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for sharedworker-classic to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/iframe.meta/unsafe-url/sharedworker-module.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.meta/unsafe-url/sharedworker-module.http.html
new file mode 100644
index 0000000000..d66916330c
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/iframe.meta/unsafe-url/sharedworker-module.http.html
@@ -0,0 +1,65 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="no-referrer">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "sharedworker-module",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for sharedworker-module to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "sharedworker-module",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for sharedworker-module to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/iframe.meta/unsafe-url/worker-classic.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.meta/unsafe-url/worker-classic.http.html
new file mode 100644
index 0000000000..25c993511e
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/iframe.meta/unsafe-url/worker-classic.http.html
@@ -0,0 +1,65 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="no-referrer">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "worker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-classic to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "worker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-classic to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/iframe.meta/unsafe-url/worker-module.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.meta/unsafe-url/worker-module.http.html
new file mode 100644
index 0000000000..811b0f2c3f
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/iframe.meta/unsafe-url/worker-module.http.html
@@ -0,0 +1,65 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="no-referrer">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "worker-module",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-module to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "worker-module",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-module to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/iframe.meta/unsafe-url/xhr.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.meta/unsafe-url/xhr.http.html
new file mode 100644
index 0000000000..4e367197fd
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/iframe.meta/unsafe-url/xhr.http.html
@@ -0,0 +1,275 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="no-referrer">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-https origin and swap-origin redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/iframe.meta/unset/a-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.meta/unset/a-tag.http.html
new file mode 100644
index 0000000000..97ecbd9b1c
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/iframe.meta/unset/a-tag.http.html
@@ -0,0 +1,83 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "a-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for a-tag to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "a-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for a-tag to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "a-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for a-tag to same-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "a-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for a-tag to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/iframe.meta/unset/fetch.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.meta/unset/fetch.http.html
new file mode 100644
index 0000000000..c9e6568b4e
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/iframe.meta/unset/fetch.http.html
@@ -0,0 +1,203 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for fetch to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for fetch to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for fetch to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for fetch to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for fetch to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for fetch to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for fetch to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for fetch to same-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for fetch to same-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for fetch to same-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/iframe.meta/unset/iframe-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.meta/unset/iframe-tag.http.html
new file mode 100644
index 0000000000..8899ecd0c6
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/iframe.meta/unset/iframe-tag.http.html
@@ -0,0 +1,203 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for iframe-tag to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for iframe-tag to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for iframe-tag to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for iframe-tag to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for iframe-tag to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for iframe-tag to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for iframe-tag to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for iframe-tag to same-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for iframe-tag to same-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for iframe-tag to same-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/iframe.meta/unset/img-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.meta/unset/img-tag.http.html
new file mode 100644
index 0000000000..26c803da6b
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/iframe.meta/unset/img-tag.http.html
@@ -0,0 +1,203 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for img-tag to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for img-tag to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for img-tag to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for img-tag to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for img-tag to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for img-tag to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for img-tag to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for img-tag to same-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for img-tag to same-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for img-tag to same-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/iframe.meta/unset/script-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.meta/unset/script-tag.http.html
new file mode 100644
index 0000000000..96c068d050
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/iframe.meta/unset/script-tag.http.html
@@ -0,0 +1,203 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for script-tag to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for script-tag to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for script-tag to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for script-tag to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for script-tag to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for script-tag to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for script-tag to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for script-tag to same-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for script-tag to same-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for script-tag to same-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/iframe.meta/unset/sharedworker-classic.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.meta/unset/sharedworker-classic.http.html
new file mode 100644
index 0000000000..8ed80c689c
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/iframe.meta/unset/sharedworker-classic.http.html
@@ -0,0 +1,53 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "sharedworker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for sharedworker-classic to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "sharedworker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for sharedworker-classic to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/iframe.meta/unset/sharedworker-module.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.meta/unset/sharedworker-module.http.html
new file mode 100644
index 0000000000..c5b8979ba0
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/iframe.meta/unset/sharedworker-module.http.html
@@ -0,0 +1,53 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "sharedworker-module",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for sharedworker-module to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "sharedworker-module",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for sharedworker-module to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/iframe.meta/unset/worker-classic.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.meta/unset/worker-classic.http.html
new file mode 100644
index 0000000000..de239fa7de
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/iframe.meta/unset/worker-classic.http.html
@@ -0,0 +1,53 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "worker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-classic to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "worker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-classic to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/iframe.meta/unset/worker-module.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.meta/unset/worker-module.http.html
new file mode 100644
index 0000000000..05d0a51b7c
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/iframe.meta/unset/worker-module.http.html
@@ -0,0 +1,53 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "worker-module",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-module to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "worker-module",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-module to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/iframe.meta/unset/xhr.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.meta/unset/xhr.http.html
new file mode 100644
index 0000000000..eee8742db8
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/iframe.meta/unset/xhr.http.html
@@ -0,0 +1,203 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for xhr to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for xhr to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for xhr to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for xhr to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for xhr to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for xhr to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for xhr to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for xhr to same-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for xhr to same-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for xhr to same-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/req.attr/no-referrer-when-downgrade/a-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/req.attr/no-referrer-when-downgrade/a-tag.http.html
new file mode 100644
index 0000000000..ae516266c8
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/req.attr/no-referrer-when-downgrade/a-tag.http.html
@@ -0,0 +1,87 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "a-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects stripped-referrer for a-tag to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "a-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects stripped-referrer for a-tag to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "a-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects stripped-referrer for a-tag to same-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "a-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects stripped-referrer for a-tag to same-https origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/req.attr/no-referrer-when-downgrade/iframe-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/req.attr/no-referrer-when-downgrade/iframe-tag.http.html
new file mode 100644
index 0000000000..90cc69bdb5
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/req.attr/no-referrer-when-downgrade/iframe-tag.http.html
@@ -0,0 +1,215 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-https origin and swap-origin redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/req.attr/no-referrer-when-downgrade/img-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/req.attr/no-referrer-when-downgrade/img-tag.http.html
new file mode 100644
index 0000000000..67d0496aee
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/req.attr/no-referrer-when-downgrade/img-tag.http.html
@@ -0,0 +1,215 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-https origin and swap-origin redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/req.attr/no-referrer-when-downgrade/script-tag-dynamic-import.http.html b/testing/web-platform/tests/referrer-policy/gen/req.attr/no-referrer-when-downgrade/script-tag-dynamic-import.http.html
new file mode 100644
index 0000000000..809bb23ef6
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/req.attr/no-referrer-when-downgrade/script-tag-dynamic-import.http.html
@@ -0,0 +1,215 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag-dynamic-import to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag-dynamic-import to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag-dynamic-import to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag-dynamic-import to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag-dynamic-import to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag-dynamic-import to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag-dynamic-import to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag-dynamic-import to same-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag-dynamic-import to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag-dynamic-import to same-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag-dynamic-import to same-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag-dynamic-import to same-https origin and swap-origin redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/req.attr/no-referrer-when-downgrade/script-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/req.attr/no-referrer-when-downgrade/script-tag.http.html
new file mode 100644
index 0000000000..847cc79171
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/req.attr/no-referrer-when-downgrade/script-tag.http.html
@@ -0,0 +1,215 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-https origin and swap-origin redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/req.attr/no-referrer/a-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/req.attr/no-referrer/a-tag.http.html
new file mode 100644
index 0000000000..ab7cd57f3d
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/req.attr/no-referrer/a-tag.http.html
@@ -0,0 +1,87 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "omitted",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "a-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects omitted for a-tag to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "a-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects omitted for a-tag to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "a-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects omitted for a-tag to same-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "a-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects omitted for a-tag to same-https origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/req.attr/no-referrer/iframe-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/req.attr/no-referrer/iframe-tag.http.html
new file mode 100644
index 0000000000..e9dfa7da6d
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/req.attr/no-referrer/iframe-tag.http.html
@@ -0,0 +1,215 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "omitted",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects omitted for iframe-tag to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects omitted for iframe-tag to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects omitted for iframe-tag to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects omitted for iframe-tag to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects omitted for iframe-tag to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects omitted for iframe-tag to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects omitted for iframe-tag to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects omitted for iframe-tag to same-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects omitted for iframe-tag to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "same-https",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects omitted for iframe-tag to same-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects omitted for iframe-tag to same-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects omitted for iframe-tag to same-https origin and swap-origin redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/req.attr/no-referrer/img-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/req.attr/no-referrer/img-tag.http.html
new file mode 100644
index 0000000000..61fecbcb0b
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/req.attr/no-referrer/img-tag.http.html
@@ -0,0 +1,215 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "omitted",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects omitted for img-tag to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects omitted for img-tag to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects omitted for img-tag to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects omitted for img-tag to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects omitted for img-tag to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects omitted for img-tag to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects omitted for img-tag to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects omitted for img-tag to same-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects omitted for img-tag to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "same-https",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects omitted for img-tag to same-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects omitted for img-tag to same-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects omitted for img-tag to same-https origin and swap-origin redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/req.attr/no-referrer/script-tag-dynamic-import.http.html b/testing/web-platform/tests/referrer-policy/gen/req.attr/no-referrer/script-tag-dynamic-import.http.html
new file mode 100644
index 0000000000..a362bbbcb6
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/req.attr/no-referrer/script-tag-dynamic-import.http.html
@@ -0,0 +1,215 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "omitted",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects omitted for script-tag-dynamic-import to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects omitted for script-tag-dynamic-import to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects omitted for script-tag-dynamic-import to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects omitted for script-tag-dynamic-import to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects omitted for script-tag-dynamic-import to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects omitted for script-tag-dynamic-import to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects omitted for script-tag-dynamic-import to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects omitted for script-tag-dynamic-import to same-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects omitted for script-tag-dynamic-import to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "same-https",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects omitted for script-tag-dynamic-import to same-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects omitted for script-tag-dynamic-import to same-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects omitted for script-tag-dynamic-import to same-https origin and swap-origin redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/req.attr/no-referrer/script-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/req.attr/no-referrer/script-tag.http.html
new file mode 100644
index 0000000000..1e23802ced
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/req.attr/no-referrer/script-tag.http.html
@@ -0,0 +1,215 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "omitted",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects omitted for script-tag to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects omitted for script-tag to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects omitted for script-tag to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects omitted for script-tag to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects omitted for script-tag to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects omitted for script-tag to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects omitted for script-tag to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects omitted for script-tag to same-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects omitted for script-tag to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "same-https",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects omitted for script-tag to same-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects omitted for script-tag to same-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects omitted for script-tag to same-https origin and swap-origin redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/req.attr/origin-when-cross-origin/a-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/req.attr/origin-when-cross-origin/a-tag.http.html
new file mode 100644
index 0000000000..15d69f5f5c
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/req.attr/origin-when-cross-origin/a-tag.http.html
@@ -0,0 +1,87 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "a-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects origin for a-tag to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "a-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects origin for a-tag to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "a-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects origin for a-tag to same-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "a-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects stripped-referrer for a-tag to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/req.attr/origin-when-cross-origin/iframe-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/req.attr/origin-when-cross-origin/iframe-tag.http.html
new file mode 100644
index 0000000000..e6a685a320
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/req.attr/origin-when-cross-origin/iframe-tag.http.html
@@ -0,0 +1,215 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects origin for iframe-tag to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects origin for iframe-tag to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects origin for iframe-tag to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects origin for iframe-tag to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects origin for iframe-tag to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects origin for iframe-tag to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects origin for iframe-tag to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects origin for iframe-tag to same-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects origin for iframe-tag to same-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects origin for iframe-tag to same-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/req.attr/origin-when-cross-origin/img-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/req.attr/origin-when-cross-origin/img-tag.http.html
new file mode 100644
index 0000000000..1dacc8b082
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/req.attr/origin-when-cross-origin/img-tag.http.html
@@ -0,0 +1,215 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects origin for img-tag to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects origin for img-tag to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects origin for img-tag to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects origin for img-tag to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects origin for img-tag to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects origin for img-tag to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects origin for img-tag to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects origin for img-tag to same-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects origin for img-tag to same-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects origin for img-tag to same-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/req.attr/origin-when-cross-origin/script-tag-dynamic-import.http.html b/testing/web-platform/tests/referrer-policy/gen/req.attr/origin-when-cross-origin/script-tag-dynamic-import.http.html
new file mode 100644
index 0000000000..f4a932e07e
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/req.attr/origin-when-cross-origin/script-tag-dynamic-import.http.html
@@ -0,0 +1,215 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects origin for script-tag-dynamic-import to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects origin for script-tag-dynamic-import to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects origin for script-tag-dynamic-import to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects origin for script-tag-dynamic-import to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects origin for script-tag-dynamic-import to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects origin for script-tag-dynamic-import to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects origin for script-tag-dynamic-import to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects origin for script-tag-dynamic-import to same-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects origin for script-tag-dynamic-import to same-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects origin for script-tag-dynamic-import to same-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag-dynamic-import to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag-dynamic-import to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/req.attr/origin-when-cross-origin/script-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/req.attr/origin-when-cross-origin/script-tag.http.html
new file mode 100644
index 0000000000..6130676892
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/req.attr/origin-when-cross-origin/script-tag.http.html
@@ -0,0 +1,215 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects origin for script-tag to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects origin for script-tag to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects origin for script-tag to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects origin for script-tag to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects origin for script-tag to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects origin for script-tag to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects origin for script-tag to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects origin for script-tag to same-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects origin for script-tag to same-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects origin for script-tag to same-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/req.attr/origin/a-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/req.attr/origin/a-tag.http.html
new file mode 100644
index 0000000000..5fcb8420dc
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/req.attr/origin/a-tag.http.html
@@ -0,0 +1,87 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "a-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects origin for a-tag to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "a-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects origin for a-tag to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "a-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects origin for a-tag to same-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "a-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects origin for a-tag to same-https origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/req.attr/origin/iframe-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/req.attr/origin/iframe-tag.http.html
new file mode 100644
index 0000000000..7f8a5779ff
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/req.attr/origin/iframe-tag.http.html
@@ -0,0 +1,215 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects origin for iframe-tag to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects origin for iframe-tag to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects origin for iframe-tag to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects origin for iframe-tag to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects origin for iframe-tag to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects origin for iframe-tag to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects origin for iframe-tag to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects origin for iframe-tag to same-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects origin for iframe-tag to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects origin for iframe-tag to same-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects origin for iframe-tag to same-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects origin for iframe-tag to same-https origin and swap-origin redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/req.attr/origin/img-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/req.attr/origin/img-tag.http.html
new file mode 100644
index 0000000000..b0257fce6b
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/req.attr/origin/img-tag.http.html
@@ -0,0 +1,215 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects origin for img-tag to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects origin for img-tag to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects origin for img-tag to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects origin for img-tag to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects origin for img-tag to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects origin for img-tag to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects origin for img-tag to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects origin for img-tag to same-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects origin for img-tag to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects origin for img-tag to same-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects origin for img-tag to same-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects origin for img-tag to same-https origin and swap-origin redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/req.attr/origin/script-tag-dynamic-import.http.html b/testing/web-platform/tests/referrer-policy/gen/req.attr/origin/script-tag-dynamic-import.http.html
new file mode 100644
index 0000000000..5d28404865
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/req.attr/origin/script-tag-dynamic-import.http.html
@@ -0,0 +1,215 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects origin for script-tag-dynamic-import to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects origin for script-tag-dynamic-import to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects origin for script-tag-dynamic-import to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects origin for script-tag-dynamic-import to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects origin for script-tag-dynamic-import to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects origin for script-tag-dynamic-import to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects origin for script-tag-dynamic-import to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects origin for script-tag-dynamic-import to same-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects origin for script-tag-dynamic-import to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects origin for script-tag-dynamic-import to same-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects origin for script-tag-dynamic-import to same-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects origin for script-tag-dynamic-import to same-https origin and swap-origin redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/req.attr/origin/script-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/req.attr/origin/script-tag.http.html
new file mode 100644
index 0000000000..208f3af38e
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/req.attr/origin/script-tag.http.html
@@ -0,0 +1,215 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects origin for script-tag to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects origin for script-tag to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects origin for script-tag to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects origin for script-tag to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects origin for script-tag to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects origin for script-tag to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects origin for script-tag to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects origin for script-tag to same-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects origin for script-tag to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects origin for script-tag to same-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects origin for script-tag to same-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects origin for script-tag to same-https origin and swap-origin redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/req.attr/same-origin/a-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/req.attr/same-origin/a-tag.http.html
new file mode 100644
index 0000000000..049c25897a
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/req.attr/same-origin/a-tag.http.html
@@ -0,0 +1,71 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "omitted",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "a-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "same-origin"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects omitted for a-tag to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "a-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "same-origin"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects omitted for a-tag to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "a-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "same-origin"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects stripped-referrer for a-tag to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/req.attr/same-origin/iframe-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/req.attr/same-origin/iframe-tag.http.html
new file mode 100644
index 0000000000..9d117a12f7
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/req.attr/same-origin/iframe-tag.http.html
@@ -0,0 +1,183 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "omitted",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "same-origin"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects omitted for iframe-tag to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "same-origin"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects omitted for iframe-tag to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "same-origin"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects omitted for iframe-tag to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "same-origin"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects omitted for iframe-tag to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "same-origin"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects omitted for iframe-tag to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "same-origin"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects omitted for iframe-tag to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "same-origin"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects omitted for iframe-tag to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "same-origin"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects omitted for iframe-tag to same-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "same-origin"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "same-origin"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/req.attr/same-origin/img-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/req.attr/same-origin/img-tag.http.html
new file mode 100644
index 0000000000..2008858276
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/req.attr/same-origin/img-tag.http.html
@@ -0,0 +1,183 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "omitted",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "same-origin"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects omitted for img-tag to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "same-origin"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects omitted for img-tag to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "same-origin"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects omitted for img-tag to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "same-origin"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects omitted for img-tag to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "same-origin"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects omitted for img-tag to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "same-origin"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects omitted for img-tag to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "same-origin"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects omitted for img-tag to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "same-origin"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects omitted for img-tag to same-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "same-origin"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "same-origin"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/req.attr/same-origin/script-tag-dynamic-import.http.html b/testing/web-platform/tests/referrer-policy/gen/req.attr/same-origin/script-tag-dynamic-import.http.html
new file mode 100644
index 0000000000..1b35dd4b35
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/req.attr/same-origin/script-tag-dynamic-import.http.html
@@ -0,0 +1,183 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "omitted",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "same-origin"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects omitted for script-tag-dynamic-import to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "same-origin"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects omitted for script-tag-dynamic-import to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "same-origin"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects omitted for script-tag-dynamic-import to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "same-origin"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects omitted for script-tag-dynamic-import to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "same-origin"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects omitted for script-tag-dynamic-import to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "same-origin"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects omitted for script-tag-dynamic-import to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "same-origin"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects omitted for script-tag-dynamic-import to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "same-origin"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects omitted for script-tag-dynamic-import to same-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "same-origin"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag-dynamic-import to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "same-origin"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag-dynamic-import to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/req.attr/same-origin/script-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/req.attr/same-origin/script-tag.http.html
new file mode 100644
index 0000000000..dfc67c6a1f
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/req.attr/same-origin/script-tag.http.html
@@ -0,0 +1,183 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "omitted",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "same-origin"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects omitted for script-tag to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "same-origin"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects omitted for script-tag to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "same-origin"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects omitted for script-tag to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "same-origin"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects omitted for script-tag to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "same-origin"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects omitted for script-tag to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "same-origin"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects omitted for script-tag to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "same-origin"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects omitted for script-tag to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "same-origin"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects omitted for script-tag to same-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "same-origin"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "same-origin"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/req.attr/strict-origin-when-cross-origin/a-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/req.attr/strict-origin-when-cross-origin/a-tag.http.html
new file mode 100644
index 0000000000..7522380a0f
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/req.attr/strict-origin-when-cross-origin/a-tag.http.html
@@ -0,0 +1,87 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "a-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects origin for a-tag to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "a-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects origin for a-tag to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "a-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects origin for a-tag to same-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "a-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects stripped-referrer for a-tag to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/req.attr/strict-origin-when-cross-origin/iframe-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/req.attr/strict-origin-when-cross-origin/iframe-tag.http.html
new file mode 100644
index 0000000000..bf5e1eaf14
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/req.attr/strict-origin-when-cross-origin/iframe-tag.http.html
@@ -0,0 +1,215 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects origin for iframe-tag to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects origin for iframe-tag to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects origin for iframe-tag to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects origin for iframe-tag to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects origin for iframe-tag to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects origin for iframe-tag to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects origin for iframe-tag to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects origin for iframe-tag to same-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects origin for iframe-tag to same-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects origin for iframe-tag to same-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/req.attr/strict-origin-when-cross-origin/img-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/req.attr/strict-origin-when-cross-origin/img-tag.http.html
new file mode 100644
index 0000000000..b16783a5fa
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/req.attr/strict-origin-when-cross-origin/img-tag.http.html
@@ -0,0 +1,215 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects origin for img-tag to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects origin for img-tag to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects origin for img-tag to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects origin for img-tag to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects origin for img-tag to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects origin for img-tag to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects origin for img-tag to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects origin for img-tag to same-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects origin for img-tag to same-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects origin for img-tag to same-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/req.attr/strict-origin-when-cross-origin/script-tag-dynamic-import.http.html b/testing/web-platform/tests/referrer-policy/gen/req.attr/strict-origin-when-cross-origin/script-tag-dynamic-import.http.html
new file mode 100644
index 0000000000..f880f0c3b9
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/req.attr/strict-origin-when-cross-origin/script-tag-dynamic-import.http.html
@@ -0,0 +1,215 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects origin for script-tag-dynamic-import to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects origin for script-tag-dynamic-import to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects origin for script-tag-dynamic-import to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects origin for script-tag-dynamic-import to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects origin for script-tag-dynamic-import to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects origin for script-tag-dynamic-import to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects origin for script-tag-dynamic-import to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects origin for script-tag-dynamic-import to same-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects origin for script-tag-dynamic-import to same-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects origin for script-tag-dynamic-import to same-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag-dynamic-import to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag-dynamic-import to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/req.attr/strict-origin-when-cross-origin/script-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/req.attr/strict-origin-when-cross-origin/script-tag.http.html
new file mode 100644
index 0000000000..db85e3a8e8
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/req.attr/strict-origin-when-cross-origin/script-tag.http.html
@@ -0,0 +1,215 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects origin for script-tag to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects origin for script-tag to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects origin for script-tag to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects origin for script-tag to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects origin for script-tag to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects origin for script-tag to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects origin for script-tag to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects origin for script-tag to same-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects origin for script-tag to same-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects origin for script-tag to same-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/req.attr/strict-origin/a-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/req.attr/strict-origin/a-tag.http.html
new file mode 100644
index 0000000000..aad8328e33
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/req.attr/strict-origin/a-tag.http.html
@@ -0,0 +1,87 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "a-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects origin for a-tag to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "a-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects origin for a-tag to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "a-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects origin for a-tag to same-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "a-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects origin for a-tag to same-https origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/req.attr/strict-origin/iframe-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/req.attr/strict-origin/iframe-tag.http.html
new file mode 100644
index 0000000000..bbf242b590
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/req.attr/strict-origin/iframe-tag.http.html
@@ -0,0 +1,215 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects origin for iframe-tag to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects origin for iframe-tag to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects origin for iframe-tag to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects origin for iframe-tag to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects origin for iframe-tag to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects origin for iframe-tag to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects origin for iframe-tag to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects origin for iframe-tag to same-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects origin for iframe-tag to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects origin for iframe-tag to same-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects origin for iframe-tag to same-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects origin for iframe-tag to same-https origin and swap-origin redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/req.attr/strict-origin/img-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/req.attr/strict-origin/img-tag.http.html
new file mode 100644
index 0000000000..a5a957d78d
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/req.attr/strict-origin/img-tag.http.html
@@ -0,0 +1,215 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects origin for img-tag to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects origin for img-tag to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects origin for img-tag to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects origin for img-tag to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects origin for img-tag to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects origin for img-tag to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects origin for img-tag to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects origin for img-tag to same-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects origin for img-tag to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects origin for img-tag to same-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects origin for img-tag to same-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects origin for img-tag to same-https origin and swap-origin redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/req.attr/strict-origin/script-tag-dynamic-import.http.html b/testing/web-platform/tests/referrer-policy/gen/req.attr/strict-origin/script-tag-dynamic-import.http.html
new file mode 100644
index 0000000000..f7899fd6e4
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/req.attr/strict-origin/script-tag-dynamic-import.http.html
@@ -0,0 +1,215 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects origin for script-tag-dynamic-import to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects origin for script-tag-dynamic-import to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects origin for script-tag-dynamic-import to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects origin for script-tag-dynamic-import to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects origin for script-tag-dynamic-import to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects origin for script-tag-dynamic-import to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects origin for script-tag-dynamic-import to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects origin for script-tag-dynamic-import to same-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects origin for script-tag-dynamic-import to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects origin for script-tag-dynamic-import to same-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects origin for script-tag-dynamic-import to same-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects origin for script-tag-dynamic-import to same-https origin and swap-origin redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/req.attr/strict-origin/script-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/req.attr/strict-origin/script-tag.http.html
new file mode 100644
index 0000000000..75d6afdffb
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/req.attr/strict-origin/script-tag.http.html
@@ -0,0 +1,215 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects origin for script-tag to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects origin for script-tag to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects origin for script-tag to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects origin for script-tag to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects origin for script-tag to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects origin for script-tag to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects origin for script-tag to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects origin for script-tag to same-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects origin for script-tag to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects origin for script-tag to same-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects origin for script-tag to same-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects origin for script-tag to same-https origin and swap-origin redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/req.attr/unsafe-url/a-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/req.attr/unsafe-url/a-tag.http.html
new file mode 100644
index 0000000000..04e590c37e
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/req.attr/unsafe-url/a-tag.http.html
@@ -0,0 +1,87 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="no-referrer">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "a-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects stripped-referrer for a-tag to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "a-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects stripped-referrer for a-tag to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "a-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects stripped-referrer for a-tag to same-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "a-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects stripped-referrer for a-tag to same-https origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/req.attr/unsafe-url/iframe-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/req.attr/unsafe-url/iframe-tag.http.html
new file mode 100644
index 0000000000..4c2a09f18a
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/req.attr/unsafe-url/iframe-tag.http.html
@@ -0,0 +1,215 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="no-referrer">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-https origin and swap-origin redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/req.attr/unsafe-url/img-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/req.attr/unsafe-url/img-tag.http.html
new file mode 100644
index 0000000000..b1053ab0e2
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/req.attr/unsafe-url/img-tag.http.html
@@ -0,0 +1,215 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="no-referrer">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-https origin and swap-origin redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/req.attr/unsafe-url/script-tag-dynamic-import.http.html b/testing/web-platform/tests/referrer-policy/gen/req.attr/unsafe-url/script-tag-dynamic-import.http.html
new file mode 100644
index 0000000000..a944f1e74c
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/req.attr/unsafe-url/script-tag-dynamic-import.http.html
@@ -0,0 +1,215 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="no-referrer">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag-dynamic-import to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag-dynamic-import to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag-dynamic-import to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag-dynamic-import to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag-dynamic-import to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag-dynamic-import to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag-dynamic-import to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag-dynamic-import to same-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag-dynamic-import to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag-dynamic-import to same-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag-dynamic-import to same-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag-dynamic-import to same-https origin and swap-origin redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/req.attr/unsafe-url/script-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/req.attr/unsafe-url/script-tag.http.html
new file mode 100644
index 0000000000..51b0db7d1a
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/req.attr/unsafe-url/script-tag.http.html
@@ -0,0 +1,215 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="no-referrer">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "attr",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-https origin and swap-origin redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/req.rel-noref/no-referrer/a-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/req.rel-noref/no-referrer/a-tag.http.html
new file mode 100644
index 0000000000..0205df0cde
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/req.rel-noref/no-referrer/a-tag.http.html
@@ -0,0 +1,87 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "omitted",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "a-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "rel-noref",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects omitted for a-tag to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "a-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "rel-noref",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects omitted for a-tag to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "a-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "rel-noref",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects omitted for a-tag to same-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "a-tag",
+ "subresource_policy_deliveries": [
+ {
+ "deliveryType": "rel-noref",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "test_description": "Referrer Policy: Expects omitted for a-tag to same-https origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/no-referrer-when-downgrade/a-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/no-referrer-when-downgrade/a-tag.http.html
new file mode 100644
index 0000000000..c00ba92de5
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/no-referrer-when-downgrade/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": "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.http-rp/no-referrer-when-downgrade/a-tag.http.html.headers b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/no-referrer-when-downgrade/a-tag.http.html.headers
new file mode 100644
index 0000000000..180358e691
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/no-referrer-when-downgrade/a-tag.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: no-referrer-when-downgrade
diff --git a/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/no-referrer-when-downgrade/fetch.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/no-referrer-when-downgrade/fetch.http.html
new file mode 100644
index 0000000000..ed3bc61f01
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/no-referrer-when-downgrade/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": "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.http-rp/no-referrer-when-downgrade/fetch.http.html.headers b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/no-referrer-when-downgrade/fetch.http.html.headers
new file mode 100644
index 0000000000..180358e691
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/no-referrer-when-downgrade/fetch.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: no-referrer-when-downgrade
diff --git a/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/no-referrer-when-downgrade/iframe-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/no-referrer-when-downgrade/iframe-tag.http.html
new file mode 100644
index 0000000000..a4fb7d8629
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/no-referrer-when-downgrade/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": "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.http-rp/no-referrer-when-downgrade/iframe-tag.http.html.headers b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/no-referrer-when-downgrade/iframe-tag.http.html.headers
new file mode 100644
index 0000000000..180358e691
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/no-referrer-when-downgrade/iframe-tag.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: no-referrer-when-downgrade
diff --git a/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/no-referrer-when-downgrade/img-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/no-referrer-when-downgrade/img-tag.http.html
new file mode 100644
index 0000000000..948089af7e
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/no-referrer-when-downgrade/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": "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.http-rp/no-referrer-when-downgrade/img-tag.http.html.headers b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/no-referrer-when-downgrade/img-tag.http.html.headers
new file mode 100644
index 0000000000..180358e691
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/no-referrer-when-downgrade/img-tag.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: no-referrer-when-downgrade
diff --git a/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/no-referrer-when-downgrade/script-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/no-referrer-when-downgrade/script-tag.http.html
new file mode 100644
index 0000000000..5d152c996a
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/no-referrer-when-downgrade/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": "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.http-rp/no-referrer-when-downgrade/script-tag.http.html.headers b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/no-referrer-when-downgrade/script-tag.http.html.headers
new file mode 100644
index 0000000000..180358e691
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/no-referrer-when-downgrade/script-tag.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: no-referrer-when-downgrade
diff --git a/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/no-referrer-when-downgrade/sharedworker-classic.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/no-referrer-when-downgrade/sharedworker-classic.http.html
new file mode 100644
index 0000000000..de1c533bfc
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/no-referrer-when-downgrade/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.http-rp/no-referrer-when-downgrade/sharedworker-classic.http.html.headers b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/no-referrer-when-downgrade/sharedworker-classic.http.html.headers
new file mode 100644
index 0000000000..180358e691
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/no-referrer-when-downgrade/sharedworker-classic.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: no-referrer-when-downgrade
diff --git a/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/no-referrer-when-downgrade/sharedworker-module.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/no-referrer-when-downgrade/sharedworker-module.http.html
new file mode 100644
index 0000000000..c088ac04d7
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/no-referrer-when-downgrade/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.http-rp/no-referrer-when-downgrade/sharedworker-module.http.html.headers b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/no-referrer-when-downgrade/sharedworker-module.http.html.headers
new file mode 100644
index 0000000000..180358e691
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/no-referrer-when-downgrade/sharedworker-module.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: no-referrer-when-downgrade
diff --git a/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/no-referrer-when-downgrade/worker-classic.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/no-referrer-when-downgrade/worker-classic.http.html
new file mode 100644
index 0000000000..8433c4d9df
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/no-referrer-when-downgrade/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.http-rp/no-referrer-when-downgrade/worker-classic.http.html.headers b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/no-referrer-when-downgrade/worker-classic.http.html.headers
new file mode 100644
index 0000000000..180358e691
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/no-referrer-when-downgrade/worker-classic.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: no-referrer-when-downgrade
diff --git a/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/no-referrer-when-downgrade/worker-module.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/no-referrer-when-downgrade/worker-module.http.html
new file mode 100644
index 0000000000..bc0657d31c
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/no-referrer-when-downgrade/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.http-rp/no-referrer-when-downgrade/worker-module.http.html.headers b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/no-referrer-when-downgrade/worker-module.http.html.headers
new file mode 100644
index 0000000000..180358e691
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/no-referrer-when-downgrade/worker-module.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: no-referrer-when-downgrade
diff --git a/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/no-referrer-when-downgrade/xhr.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/no-referrer-when-downgrade/xhr.http.html
new file mode 100644
index 0000000000..20d3eb1ff8
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/no-referrer-when-downgrade/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": "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.http-rp/no-referrer-when-downgrade/xhr.http.html.headers b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/no-referrer-when-downgrade/xhr.http.html.headers
new file mode 100644
index 0000000000..180358e691
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/no-referrer-when-downgrade/xhr.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: no-referrer-when-downgrade
diff --git a/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/no-referrer/a-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/no-referrer/a-tag.http.html
new file mode 100644
index 0000000000..f9fada238b
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/no-referrer/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": "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.http-rp/no-referrer/a-tag.http.html.headers b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/no-referrer/a-tag.http.html.headers
new file mode 100644
index 0000000000..b3b55087ed
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/no-referrer/a-tag.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: no-referrer
diff --git a/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/no-referrer/fetch.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/no-referrer/fetch.http.html
new file mode 100644
index 0000000000..8bc2cf3b06
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/no-referrer/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": "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.http-rp/no-referrer/fetch.http.html.headers b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/no-referrer/fetch.http.html.headers
new file mode 100644
index 0000000000..b3b55087ed
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/no-referrer/fetch.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: no-referrer
diff --git a/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/no-referrer/iframe-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/no-referrer/iframe-tag.http.html
new file mode 100644
index 0000000000..555121b533
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/no-referrer/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": "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.http-rp/no-referrer/iframe-tag.http.html.headers b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/no-referrer/iframe-tag.http.html.headers
new file mode 100644
index 0000000000..b3b55087ed
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/no-referrer/iframe-tag.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: no-referrer
diff --git a/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/no-referrer/img-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/no-referrer/img-tag.http.html
new file mode 100644
index 0000000000..8fe04405ce
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/no-referrer/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": "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.http-rp/no-referrer/img-tag.http.html.headers b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/no-referrer/img-tag.http.html.headers
new file mode 100644
index 0000000000..b3b55087ed
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/no-referrer/img-tag.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: no-referrer
diff --git a/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/no-referrer/script-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/no-referrer/script-tag.http.html
new file mode 100644
index 0000000000..08bc808964
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/no-referrer/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": "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.http-rp/no-referrer/script-tag.http.html.headers b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/no-referrer/script-tag.http.html.headers
new file mode 100644
index 0000000000..b3b55087ed
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/no-referrer/script-tag.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: no-referrer
diff --git a/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/no-referrer/sharedworker-classic.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/no-referrer/sharedworker-classic.http.html
new file mode 100644
index 0000000000..4812eb7a2e
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/no-referrer/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": "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.http-rp/no-referrer/sharedworker-classic.http.html.headers b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/no-referrer/sharedworker-classic.http.html.headers
new file mode 100644
index 0000000000..b3b55087ed
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/no-referrer/sharedworker-classic.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: no-referrer
diff --git a/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/no-referrer/sharedworker-module.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/no-referrer/sharedworker-module.http.html
new file mode 100644
index 0000000000..5e773eaa9f
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/no-referrer/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": "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.http-rp/no-referrer/sharedworker-module.http.html.headers b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/no-referrer/sharedworker-module.http.html.headers
new file mode 100644
index 0000000000..b3b55087ed
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/no-referrer/sharedworker-module.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: no-referrer
diff --git a/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/no-referrer/worker-classic.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/no-referrer/worker-classic.http.html
new file mode 100644
index 0000000000..cadb0206d8
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/no-referrer/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": "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.http-rp/no-referrer/worker-classic.http.html.headers b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/no-referrer/worker-classic.http.html.headers
new file mode 100644
index 0000000000..b3b55087ed
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/no-referrer/worker-classic.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: no-referrer
diff --git a/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/no-referrer/worker-module.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/no-referrer/worker-module.http.html
new file mode 100644
index 0000000000..05f2660923
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/no-referrer/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": "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.http-rp/no-referrer/worker-module.http.html.headers b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/no-referrer/worker-module.http.html.headers
new file mode 100644
index 0000000000..b3b55087ed
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/no-referrer/worker-module.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: no-referrer
diff --git a/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/no-referrer/xhr.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/no-referrer/xhr.http.html
new file mode 100644
index 0000000000..529b7646c8
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/no-referrer/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": "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.http-rp/no-referrer/xhr.http.html.headers b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/no-referrer/xhr.http.html.headers
new file mode 100644
index 0000000000..b3b55087ed
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/no-referrer/xhr.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: no-referrer
diff --git a/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/origin-when-cross-origin/a-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/origin-when-cross-origin/a-tag.http.html
new file mode 100644
index 0000000000..6ed5f3bb75
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/origin-when-cross-origin/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.http-rp/origin-when-cross-origin/a-tag.http.html.headers b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/origin-when-cross-origin/a-tag.http.html.headers
new file mode 100644
index 0000000000..a15ea7c65c
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/origin-when-cross-origin/a-tag.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: origin-when-cross-origin
diff --git a/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/origin-when-cross-origin/fetch.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/origin-when-cross-origin/fetch.http.html
new file mode 100644
index 0000000000..6ce6800ed1
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/origin-when-cross-origin/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.http-rp/origin-when-cross-origin/fetch.http.html.headers b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/origin-when-cross-origin/fetch.http.html.headers
new file mode 100644
index 0000000000..a15ea7c65c
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/origin-when-cross-origin/fetch.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: origin-when-cross-origin
diff --git a/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/origin-when-cross-origin/iframe-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/origin-when-cross-origin/iframe-tag.http.html
new file mode 100644
index 0000000000..6a0c528686
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/origin-when-cross-origin/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.http-rp/origin-when-cross-origin/iframe-tag.http.html.headers b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/origin-when-cross-origin/iframe-tag.http.html.headers
new file mode 100644
index 0000000000..a15ea7c65c
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/origin-when-cross-origin/iframe-tag.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: origin-when-cross-origin
diff --git a/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/origin-when-cross-origin/img-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/origin-when-cross-origin/img-tag.http.html
new file mode 100644
index 0000000000..aed278716d
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/origin-when-cross-origin/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.http-rp/origin-when-cross-origin/img-tag.http.html.headers b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/origin-when-cross-origin/img-tag.http.html.headers
new file mode 100644
index 0000000000..a15ea7c65c
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/origin-when-cross-origin/img-tag.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: origin-when-cross-origin
diff --git a/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/origin-when-cross-origin/script-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/origin-when-cross-origin/script-tag.http.html
new file mode 100644
index 0000000000..74212a61fb
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/origin-when-cross-origin/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.http-rp/origin-when-cross-origin/script-tag.http.html.headers b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/origin-when-cross-origin/script-tag.http.html.headers
new file mode 100644
index 0000000000..a15ea7c65c
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/origin-when-cross-origin/script-tag.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: origin-when-cross-origin
diff --git a/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/origin-when-cross-origin/sharedworker-classic.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/origin-when-cross-origin/sharedworker-classic.http.html
new file mode 100644
index 0000000000..de1c533bfc
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/origin-when-cross-origin/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.http-rp/origin-when-cross-origin/sharedworker-classic.http.html.headers b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/origin-when-cross-origin/sharedworker-classic.http.html.headers
new file mode 100644
index 0000000000..a15ea7c65c
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/origin-when-cross-origin/sharedworker-classic.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: origin-when-cross-origin
diff --git a/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/origin-when-cross-origin/sharedworker-module.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/origin-when-cross-origin/sharedworker-module.http.html
new file mode 100644
index 0000000000..c088ac04d7
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/origin-when-cross-origin/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.http-rp/origin-when-cross-origin/sharedworker-module.http.html.headers b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/origin-when-cross-origin/sharedworker-module.http.html.headers
new file mode 100644
index 0000000000..a15ea7c65c
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/origin-when-cross-origin/sharedworker-module.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: origin-when-cross-origin
diff --git a/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/origin-when-cross-origin/worker-classic.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/origin-when-cross-origin/worker-classic.http.html
new file mode 100644
index 0000000000..8433c4d9df
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/origin-when-cross-origin/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.http-rp/origin-when-cross-origin/worker-classic.http.html.headers b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/origin-when-cross-origin/worker-classic.http.html.headers
new file mode 100644
index 0000000000..a15ea7c65c
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/origin-when-cross-origin/worker-classic.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: origin-when-cross-origin
diff --git a/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/origin-when-cross-origin/worker-module.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/origin-when-cross-origin/worker-module.http.html
new file mode 100644
index 0000000000..bc0657d31c
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/origin-when-cross-origin/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.http-rp/origin-when-cross-origin/worker-module.http.html.headers b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/origin-when-cross-origin/worker-module.http.html.headers
new file mode 100644
index 0000000000..a15ea7c65c
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/origin-when-cross-origin/worker-module.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: origin-when-cross-origin
diff --git a/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/origin-when-cross-origin/xhr.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/origin-when-cross-origin/xhr.http.html
new file mode 100644
index 0000000000..a54c8dec65
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/origin-when-cross-origin/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>
diff --git a/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/origin-when-cross-origin/xhr.http.html.headers b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/origin-when-cross-origin/xhr.http.html.headers
new file mode 100644
index 0000000000..a15ea7c65c
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/origin-when-cross-origin/xhr.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: origin-when-cross-origin
diff --git a/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/origin/a-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/origin/a-tag.http.html
new file mode 100644
index 0000000000..5f24860f17
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/origin/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-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.http-rp/origin/a-tag.http.html.headers b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/origin/a-tag.http.html.headers
new file mode 100644
index 0000000000..ecff74b90d
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/origin/a-tag.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: origin
diff --git a/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/origin/fetch.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/origin/fetch.http.html
new file mode 100644
index 0000000000..75e1bac179
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/origin/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": "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.http-rp/origin/fetch.http.html.headers b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/origin/fetch.http.html.headers
new file mode 100644
index 0000000000..ecff74b90d
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/origin/fetch.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: origin
diff --git a/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/origin/iframe-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/origin/iframe-tag.http.html
new file mode 100644
index 0000000000..8e40188f6c
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/origin/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": "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.http-rp/origin/iframe-tag.http.html.headers b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/origin/iframe-tag.http.html.headers
new file mode 100644
index 0000000000..ecff74b90d
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/origin/iframe-tag.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: origin
diff --git a/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/origin/img-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/origin/img-tag.http.html
new file mode 100644
index 0000000000..21013c61e4
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/origin/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": "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.http-rp/origin/img-tag.http.html.headers b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/origin/img-tag.http.html.headers
new file mode 100644
index 0000000000..ecff74b90d
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/origin/img-tag.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: origin
diff --git a/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/origin/script-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/origin/script-tag.http.html
new file mode 100644
index 0000000000..3e542dbb59
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/origin/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": "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.http-rp/origin/script-tag.http.html.headers b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/origin/script-tag.http.html.headers
new file mode 100644
index 0000000000..ecff74b90d
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/origin/script-tag.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: origin
diff --git a/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/origin/sharedworker-classic.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/origin/sharedworker-classic.http.html
new file mode 100644
index 0000000000..d10a631c99
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/origin/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": "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.http-rp/origin/sharedworker-classic.http.html.headers b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/origin/sharedworker-classic.http.html.headers
new file mode 100644
index 0000000000..ecff74b90d
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/origin/sharedworker-classic.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: origin
diff --git a/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/origin/sharedworker-module.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/origin/sharedworker-module.http.html
new file mode 100644
index 0000000000..5bd7631966
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/origin/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": "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.http-rp/origin/sharedworker-module.http.html.headers b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/origin/sharedworker-module.http.html.headers
new file mode 100644
index 0000000000..ecff74b90d
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/origin/sharedworker-module.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: origin
diff --git a/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/origin/worker-classic.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/origin/worker-classic.http.html
new file mode 100644
index 0000000000..3a901d4df9
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/origin/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": "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.http-rp/origin/worker-classic.http.html.headers b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/origin/worker-classic.http.html.headers
new file mode 100644
index 0000000000..ecff74b90d
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/origin/worker-classic.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: origin
diff --git a/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/origin/worker-module.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/origin/worker-module.http.html
new file mode 100644
index 0000000000..35cbe42e1c
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/origin/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": "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.http-rp/origin/worker-module.http.html.headers b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/origin/worker-module.http.html.headers
new file mode 100644
index 0000000000..ecff74b90d
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/origin/worker-module.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: origin
diff --git a/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/origin/xhr.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/origin/xhr.http.html
new file mode 100644
index 0000000000..0e691f8079
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/origin/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": "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.http-rp/origin/xhr.http.html.headers b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/origin/xhr.http.html.headers
new file mode 100644
index 0000000000..ecff74b90d
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/origin/xhr.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: origin
diff --git a/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/same-origin/a-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/same-origin/a-tag.http.html
new file mode 100644
index 0000000000..4722bc8f92
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/same-origin/a-tag.http.html
@@ -0,0 +1,67 @@
+<!DOCTYPE html>
+<!-- DO 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": "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.http-rp/same-origin/a-tag.http.html.headers b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/same-origin/a-tag.http.html.headers
new file mode 100644
index 0000000000..be66cf9321
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/same-origin/a-tag.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: same-origin
diff --git a/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/same-origin/fetch.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/same-origin/fetch.http.html
new file mode 100644
index 0000000000..ca88a138c0
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/same-origin/fetch.http.html
@@ -0,0 +1,172 @@
+<!DOCTYPE html>
+<!-- DO 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": "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.http-rp/same-origin/fetch.http.html.headers b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/same-origin/fetch.http.html.headers
new file mode 100644
index 0000000000..be66cf9321
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/same-origin/fetch.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: same-origin
diff --git a/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/same-origin/iframe-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/same-origin/iframe-tag.http.html
new file mode 100644
index 0000000000..a95cfde13a
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/same-origin/iframe-tag.http.html
@@ -0,0 +1,172 @@
+<!DOCTYPE html>
+<!-- DO 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": "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.http-rp/same-origin/iframe-tag.http.html.headers b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/same-origin/iframe-tag.http.html.headers
new file mode 100644
index 0000000000..be66cf9321
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/same-origin/iframe-tag.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: same-origin
diff --git a/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/same-origin/img-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/same-origin/img-tag.http.html
new file mode 100644
index 0000000000..81c06823b6
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/same-origin/img-tag.http.html
@@ -0,0 +1,172 @@
+<!DOCTYPE html>
+<!-- DO 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": "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.http-rp/same-origin/img-tag.http.html.headers b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/same-origin/img-tag.http.html.headers
new file mode 100644
index 0000000000..be66cf9321
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/same-origin/img-tag.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: same-origin
diff --git a/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/same-origin/script-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/same-origin/script-tag.http.html
new file mode 100644
index 0000000000..450ebffcc0
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/same-origin/script-tag.http.html
@@ -0,0 +1,172 @@
+<!DOCTYPE html>
+<!-- DO 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": "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.http-rp/same-origin/script-tag.http.html.headers b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/same-origin/script-tag.http.html.headers
new file mode 100644
index 0000000000..be66cf9321
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/same-origin/script-tag.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: same-origin
diff --git a/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/same-origin/sharedworker-classic.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/same-origin/sharedworker-classic.http.html
new file mode 100644
index 0000000000..de1c533bfc
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/same-origin/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.http-rp/same-origin/sharedworker-classic.http.html.headers b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/same-origin/sharedworker-classic.http.html.headers
new file mode 100644
index 0000000000..be66cf9321
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/same-origin/sharedworker-classic.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: same-origin
diff --git a/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/same-origin/sharedworker-module.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/same-origin/sharedworker-module.http.html
new file mode 100644
index 0000000000..c088ac04d7
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/same-origin/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.http-rp/same-origin/sharedworker-module.http.html.headers b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/same-origin/sharedworker-module.http.html.headers
new file mode 100644
index 0000000000..be66cf9321
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/same-origin/sharedworker-module.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: same-origin
diff --git a/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/same-origin/worker-classic.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/same-origin/worker-classic.http.html
new file mode 100644
index 0000000000..8433c4d9df
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/same-origin/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.http-rp/same-origin/worker-classic.http.html.headers b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/same-origin/worker-classic.http.html.headers
new file mode 100644
index 0000000000..be66cf9321
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/same-origin/worker-classic.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: same-origin
diff --git a/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/same-origin/worker-module.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/same-origin/worker-module.http.html
new file mode 100644
index 0000000000..bc0657d31c
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/same-origin/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.http-rp/same-origin/worker-module.http.html.headers b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/same-origin/worker-module.http.html.headers
new file mode 100644
index 0000000000..be66cf9321
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/same-origin/worker-module.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: same-origin
diff --git a/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/same-origin/xhr.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/same-origin/xhr.http.html
new file mode 100644
index 0000000000..9069ca9924
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/same-origin/xhr.http.html
@@ -0,0 +1,172 @@
+<!DOCTYPE html>
+<!-- DO 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": "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.http-rp/same-origin/xhr.http.html.headers b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/same-origin/xhr.http.html.headers
new file mode 100644
index 0000000000..be66cf9321
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/same-origin/xhr.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: same-origin
diff --git a/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/strict-origin-when-cross-origin/a-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/strict-origin-when-cross-origin/a-tag.http.html
new file mode 100644
index 0000000000..6ed5f3bb75
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/strict-origin-when-cross-origin/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.http-rp/strict-origin-when-cross-origin/a-tag.http.html.headers b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/strict-origin-when-cross-origin/a-tag.http.html.headers
new file mode 100644
index 0000000000..4cff1d12f8
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/strict-origin-when-cross-origin/a-tag.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: strict-origin-when-cross-origin
diff --git a/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/strict-origin-when-cross-origin/fetch.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/strict-origin-when-cross-origin/fetch.http.html
new file mode 100644
index 0000000000..6ce6800ed1
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/strict-origin-when-cross-origin/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.http-rp/strict-origin-when-cross-origin/fetch.http.html.headers b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/strict-origin-when-cross-origin/fetch.http.html.headers
new file mode 100644
index 0000000000..4cff1d12f8
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/strict-origin-when-cross-origin/fetch.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: strict-origin-when-cross-origin
diff --git a/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/strict-origin-when-cross-origin/iframe-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/strict-origin-when-cross-origin/iframe-tag.http.html
new file mode 100644
index 0000000000..6a0c528686
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/strict-origin-when-cross-origin/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.http-rp/strict-origin-when-cross-origin/iframe-tag.http.html.headers b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/strict-origin-when-cross-origin/iframe-tag.http.html.headers
new file mode 100644
index 0000000000..4cff1d12f8
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/strict-origin-when-cross-origin/iframe-tag.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: strict-origin-when-cross-origin
diff --git a/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/strict-origin-when-cross-origin/img-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/strict-origin-when-cross-origin/img-tag.http.html
new file mode 100644
index 0000000000..aed278716d
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/strict-origin-when-cross-origin/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.http-rp/strict-origin-when-cross-origin/img-tag.http.html.headers b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/strict-origin-when-cross-origin/img-tag.http.html.headers
new file mode 100644
index 0000000000..4cff1d12f8
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/strict-origin-when-cross-origin/img-tag.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: strict-origin-when-cross-origin
diff --git a/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/strict-origin-when-cross-origin/script-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/strict-origin-when-cross-origin/script-tag.http.html
new file mode 100644
index 0000000000..74212a61fb
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/strict-origin-when-cross-origin/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.http-rp/strict-origin-when-cross-origin/script-tag.http.html.headers b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/strict-origin-when-cross-origin/script-tag.http.html.headers
new file mode 100644
index 0000000000..4cff1d12f8
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/strict-origin-when-cross-origin/script-tag.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: strict-origin-when-cross-origin
diff --git a/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/strict-origin-when-cross-origin/sharedworker-classic.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/strict-origin-when-cross-origin/sharedworker-classic.http.html
new file mode 100644
index 0000000000..de1c533bfc
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/strict-origin-when-cross-origin/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.http-rp/strict-origin-when-cross-origin/sharedworker-classic.http.html.headers b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/strict-origin-when-cross-origin/sharedworker-classic.http.html.headers
new file mode 100644
index 0000000000..4cff1d12f8
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/strict-origin-when-cross-origin/sharedworker-classic.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: strict-origin-when-cross-origin
diff --git a/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/strict-origin-when-cross-origin/sharedworker-module.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/strict-origin-when-cross-origin/sharedworker-module.http.html
new file mode 100644
index 0000000000..c088ac04d7
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/strict-origin-when-cross-origin/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.http-rp/strict-origin-when-cross-origin/sharedworker-module.http.html.headers b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/strict-origin-when-cross-origin/sharedworker-module.http.html.headers
new file mode 100644
index 0000000000..4cff1d12f8
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/strict-origin-when-cross-origin/sharedworker-module.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: strict-origin-when-cross-origin
diff --git a/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/strict-origin-when-cross-origin/worker-classic.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/strict-origin-when-cross-origin/worker-classic.http.html
new file mode 100644
index 0000000000..8433c4d9df
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/strict-origin-when-cross-origin/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.http-rp/strict-origin-when-cross-origin/worker-classic.http.html.headers b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/strict-origin-when-cross-origin/worker-classic.http.html.headers
new file mode 100644
index 0000000000..4cff1d12f8
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/strict-origin-when-cross-origin/worker-classic.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: strict-origin-when-cross-origin
diff --git a/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/strict-origin-when-cross-origin/worker-module.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/strict-origin-when-cross-origin/worker-module.http.html
new file mode 100644
index 0000000000..bc0657d31c
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/strict-origin-when-cross-origin/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.http-rp/strict-origin-when-cross-origin/worker-module.http.html.headers b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/strict-origin-when-cross-origin/worker-module.http.html.headers
new file mode 100644
index 0000000000..4cff1d12f8
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/strict-origin-when-cross-origin/worker-module.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: strict-origin-when-cross-origin
diff --git a/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/strict-origin-when-cross-origin/xhr.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/strict-origin-when-cross-origin/xhr.http.html
new file mode 100644
index 0000000000..a54c8dec65
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/strict-origin-when-cross-origin/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>
diff --git a/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/strict-origin-when-cross-origin/xhr.http.html.headers b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/strict-origin-when-cross-origin/xhr.http.html.headers
new file mode 100644
index 0000000000..4cff1d12f8
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/strict-origin-when-cross-origin/xhr.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: strict-origin-when-cross-origin
diff --git a/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/strict-origin/a-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/strict-origin/a-tag.http.html
new file mode 100644
index 0000000000..5f24860f17
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/strict-origin/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-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.http-rp/strict-origin/a-tag.http.html.headers b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/strict-origin/a-tag.http.html.headers
new file mode 100644
index 0000000000..1c32fba5a1
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/strict-origin/a-tag.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: strict-origin
diff --git a/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/strict-origin/fetch.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/strict-origin/fetch.http.html
new file mode 100644
index 0000000000..75e1bac179
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/strict-origin/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": "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.http-rp/strict-origin/fetch.http.html.headers b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/strict-origin/fetch.http.html.headers
new file mode 100644
index 0000000000..1c32fba5a1
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/strict-origin/fetch.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: strict-origin
diff --git a/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/strict-origin/iframe-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/strict-origin/iframe-tag.http.html
new file mode 100644
index 0000000000..8e40188f6c
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/strict-origin/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": "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.http-rp/strict-origin/iframe-tag.http.html.headers b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/strict-origin/iframe-tag.http.html.headers
new file mode 100644
index 0000000000..1c32fba5a1
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/strict-origin/iframe-tag.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: strict-origin
diff --git a/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/strict-origin/img-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/strict-origin/img-tag.http.html
new file mode 100644
index 0000000000..21013c61e4
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/strict-origin/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": "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.http-rp/strict-origin/img-tag.http.html.headers b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/strict-origin/img-tag.http.html.headers
new file mode 100644
index 0000000000..1c32fba5a1
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/strict-origin/img-tag.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: strict-origin
diff --git a/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/strict-origin/script-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/strict-origin/script-tag.http.html
new file mode 100644
index 0000000000..3e542dbb59
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/strict-origin/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": "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.http-rp/strict-origin/script-tag.http.html.headers b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/strict-origin/script-tag.http.html.headers
new file mode 100644
index 0000000000..1c32fba5a1
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/strict-origin/script-tag.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: strict-origin
diff --git a/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/strict-origin/sharedworker-classic.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/strict-origin/sharedworker-classic.http.html
new file mode 100644
index 0000000000..d10a631c99
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/strict-origin/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": "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.http-rp/strict-origin/sharedworker-classic.http.html.headers b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/strict-origin/sharedworker-classic.http.html.headers
new file mode 100644
index 0000000000..1c32fba5a1
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/strict-origin/sharedworker-classic.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: strict-origin
diff --git a/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/strict-origin/sharedworker-module.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/strict-origin/sharedworker-module.http.html
new file mode 100644
index 0000000000..5bd7631966
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/strict-origin/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": "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.http-rp/strict-origin/sharedworker-module.http.html.headers b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/strict-origin/sharedworker-module.http.html.headers
new file mode 100644
index 0000000000..1c32fba5a1
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/strict-origin/sharedworker-module.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: strict-origin
diff --git a/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/strict-origin/worker-classic.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/strict-origin/worker-classic.http.html
new file mode 100644
index 0000000000..3a901d4df9
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/strict-origin/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": "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.http-rp/strict-origin/worker-classic.http.html.headers b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/strict-origin/worker-classic.http.html.headers
new file mode 100644
index 0000000000..1c32fba5a1
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/strict-origin/worker-classic.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: strict-origin
diff --git a/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/strict-origin/worker-module.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/strict-origin/worker-module.http.html
new file mode 100644
index 0000000000..35cbe42e1c
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/strict-origin/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": "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.http-rp/strict-origin/worker-module.http.html.headers b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/strict-origin/worker-module.http.html.headers
new file mode 100644
index 0000000000..1c32fba5a1
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/strict-origin/worker-module.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: strict-origin
diff --git a/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/strict-origin/xhr.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/strict-origin/xhr.http.html
new file mode 100644
index 0000000000..0e691f8079
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/strict-origin/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": "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.http-rp/strict-origin/xhr.http.html.headers b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/strict-origin/xhr.http.html.headers
new file mode 100644
index 0000000000..1c32fba5a1
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/strict-origin/xhr.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: strict-origin
diff --git a/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/unsafe-url/a-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/unsafe-url/a-tag.http.html
new file mode 100644
index 0000000000..c00ba92de5
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/unsafe-url/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": "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.http-rp/unsafe-url/a-tag.http.html.headers b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/unsafe-url/a-tag.http.html.headers
new file mode 100644
index 0000000000..c1d3fd1a0b
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/unsafe-url/a-tag.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: unsafe-url
diff --git a/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/unsafe-url/fetch.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/unsafe-url/fetch.http.html
new file mode 100644
index 0000000000..ed3bc61f01
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/unsafe-url/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": "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.http-rp/unsafe-url/fetch.http.html.headers b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/unsafe-url/fetch.http.html.headers
new file mode 100644
index 0000000000..c1d3fd1a0b
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/unsafe-url/fetch.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: unsafe-url
diff --git a/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/unsafe-url/iframe-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/unsafe-url/iframe-tag.http.html
new file mode 100644
index 0000000000..a4fb7d8629
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/unsafe-url/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": "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.http-rp/unsafe-url/iframe-tag.http.html.headers b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/unsafe-url/iframe-tag.http.html.headers
new file mode 100644
index 0000000000..c1d3fd1a0b
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/unsafe-url/iframe-tag.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: unsafe-url
diff --git a/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/unsafe-url/img-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/unsafe-url/img-tag.http.html
new file mode 100644
index 0000000000..948089af7e
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/unsafe-url/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": "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.http-rp/unsafe-url/img-tag.http.html.headers b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/unsafe-url/img-tag.http.html.headers
new file mode 100644
index 0000000000..c1d3fd1a0b
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/unsafe-url/img-tag.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: unsafe-url
diff --git a/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/unsafe-url/script-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/unsafe-url/script-tag.http.html
new file mode 100644
index 0000000000..5d152c996a
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/unsafe-url/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": "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.http-rp/unsafe-url/script-tag.http.html.headers b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/unsafe-url/script-tag.http.html.headers
new file mode 100644
index 0000000000..c1d3fd1a0b
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/unsafe-url/script-tag.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: unsafe-url
diff --git a/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/unsafe-url/sharedworker-classic.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/unsafe-url/sharedworker-classic.http.html
new file mode 100644
index 0000000000..de1c533bfc
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/unsafe-url/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.http-rp/unsafe-url/sharedworker-classic.http.html.headers b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/unsafe-url/sharedworker-classic.http.html.headers
new file mode 100644
index 0000000000..c1d3fd1a0b
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/unsafe-url/sharedworker-classic.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: unsafe-url
diff --git a/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/unsafe-url/sharedworker-module.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/unsafe-url/sharedworker-module.http.html
new file mode 100644
index 0000000000..c088ac04d7
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/unsafe-url/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.http-rp/unsafe-url/sharedworker-module.http.html.headers b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/unsafe-url/sharedworker-module.http.html.headers
new file mode 100644
index 0000000000..c1d3fd1a0b
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/unsafe-url/sharedworker-module.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: unsafe-url
diff --git a/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/unsafe-url/worker-classic.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/unsafe-url/worker-classic.http.html
new file mode 100644
index 0000000000..8433c4d9df
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/unsafe-url/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.http-rp/unsafe-url/worker-classic.http.html.headers b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/unsafe-url/worker-classic.http.html.headers
new file mode 100644
index 0000000000..c1d3fd1a0b
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/unsafe-url/worker-classic.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: unsafe-url
diff --git a/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/unsafe-url/worker-module.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/unsafe-url/worker-module.http.html
new file mode 100644
index 0000000000..bc0657d31c
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/unsafe-url/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.http-rp/unsafe-url/worker-module.http.html.headers b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/unsafe-url/worker-module.http.html.headers
new file mode 100644
index 0000000000..c1d3fd1a0b
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/unsafe-url/worker-module.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: unsafe-url
diff --git a/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/unsafe-url/xhr.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/unsafe-url/xhr.http.html
new file mode 100644
index 0000000000..20d3eb1ff8
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/unsafe-url/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": "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.http-rp/unsafe-url/xhr.http.html.headers b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/unsafe-url/xhr.http.html.headers
new file mode 100644
index 0000000000..c1d3fd1a0b
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/unsafe-url/xhr.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: unsafe-url
diff --git a/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/unset/a-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/unset/a-tag.http.html
new file mode 100644
index 0000000000..6ed5f3bb75
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/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.http-rp/unset/fetch.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/unset/fetch.http.html
new file mode 100644
index 0000000000..6ce6800ed1
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/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.http-rp/unset/iframe-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/unset/iframe-tag.http.html
new file mode 100644
index 0000000000..6a0c528686
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/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.http-rp/unset/img-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/unset/img-tag.http.html
new file mode 100644
index 0000000000..aed278716d
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/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.http-rp/unset/script-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/unset/script-tag.http.html
new file mode 100644
index 0000000000..74212a61fb
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/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.http-rp/unset/sharedworker-classic.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/unset/sharedworker-classic.http.html
new file mode 100644
index 0000000000..de1c533bfc
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/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.http-rp/unset/sharedworker-module.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/unset/sharedworker-module.http.html
new file mode 100644
index 0000000000..c088ac04d7
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/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.http-rp/unset/worker-classic.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/unset/worker-classic.http.html
new file mode 100644
index 0000000000..8433c4d9df
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/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.http-rp/unset/worker-module.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/unset/worker-module.http.html
new file mode 100644
index 0000000000..bc0657d31c
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/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.http-rp/unset/xhr.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/unset/xhr.http.html
new file mode 100644
index 0000000000..a54c8dec65
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.http-rp/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>
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>
diff --git a/testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/always/a-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/always/a-tag.http.html
new file mode 100644
index 0000000000..389e3ecba1
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/always/a-tag.http.html
@@ -0,0 +1,107 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "always"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "always"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "always"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "always"
+ }
+ ],
+ "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.meta/always/fetch.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/always/fetch.http.html
new file mode 100644
index 0000000000..2352a04328
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/always/fetch.http.html
@@ -0,0 +1,275 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "always"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "always"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "always"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "always"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "always"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "always"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "always"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "always"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "always"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "always"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "always"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "always"
+ }
+ ],
+ "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.meta/always/iframe-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/always/iframe-tag.http.html
new file mode 100644
index 0000000000..c7db0ab2d7
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/always/iframe-tag.http.html
@@ -0,0 +1,275 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "always"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "always"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "always"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "always"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "always"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "always"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "always"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "always"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "always"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "always"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "always"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "always"
+ }
+ ],
+ "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.meta/always/img-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/always/img-tag.http.html
new file mode 100644
index 0000000000..504f372655
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/always/img-tag.http.html
@@ -0,0 +1,275 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "always"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "always"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "always"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "always"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "always"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "always"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "always"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "always"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "always"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "always"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "always"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "always"
+ }
+ ],
+ "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.meta/always/script-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/always/script-tag.http.html
new file mode 100644
index 0000000000..5380552ea2
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/always/script-tag.http.html
@@ -0,0 +1,275 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "always"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "always"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "always"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "always"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "always"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "always"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "always"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "always"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "always"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "always"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "always"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "always"
+ }
+ ],
+ "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.meta/always/sharedworker-classic.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/always/sharedworker-classic.http.html
new file mode 100644
index 0000000000..78e8e125f7
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/always/sharedworker-classic.http.html
@@ -0,0 +1,65 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "always"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "always"
+ }
+ ],
+ "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.meta/always/sharedworker-module.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/always/sharedworker-module.http.html
new file mode 100644
index 0000000000..c817b75c55
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/always/sharedworker-module.http.html
@@ -0,0 +1,65 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "always"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "always"
+ }
+ ],
+ "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.meta/always/worker-classic.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/always/worker-classic.http.html
new file mode 100644
index 0000000000..32ef8f4d4c
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/always/worker-classic.http.html
@@ -0,0 +1,65 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "always"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "always"
+ }
+ ],
+ "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.meta/always/worker-module.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/always/worker-module.http.html
new file mode 100644
index 0000000000..79edc13536
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/always/worker-module.http.html
@@ -0,0 +1,65 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "always"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "always"
+ }
+ ],
+ "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.meta/always/xhr.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/always/xhr.http.html
new file mode 100644
index 0000000000..441a1112a0
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/always/xhr.http.html
@@ -0,0 +1,275 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "always"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "always"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "always"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "always"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "always"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "always"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "always"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "always"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "always"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "always"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "always"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "always"
+ }
+ ],
+ "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.meta/default/a-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/default/a-tag.http.html
new file mode 100644
index 0000000000..19afee2242
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/default/a-tag.http.html
@@ -0,0 +1,107 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "default"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "default"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "default"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "default"
+ }
+ ],
+ "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.meta/default/fetch.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/default/fetch.http.html
new file mode 100644
index 0000000000..0c2181a856
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/default/fetch.http.html
@@ -0,0 +1,275 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "default"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "default"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "default"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "default"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "default"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "default"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "default"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "default"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "default"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "default"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "default"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "default"
+ }
+ ],
+ "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.meta/default/iframe-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/default/iframe-tag.http.html
new file mode 100644
index 0000000000..26b0e4a658
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/default/iframe-tag.http.html
@@ -0,0 +1,275 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "default"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "default"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "default"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "default"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "default"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "default"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "default"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "default"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "default"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "default"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "default"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "default"
+ }
+ ],
+ "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.meta/default/img-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/default/img-tag.http.html
new file mode 100644
index 0000000000..2abc493c05
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/default/img-tag.http.html
@@ -0,0 +1,275 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "default"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "default"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "default"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "default"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "default"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "default"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "default"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "default"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "default"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "default"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "default"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "default"
+ }
+ ],
+ "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.meta/default/script-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/default/script-tag.http.html
new file mode 100644
index 0000000000..145f663261
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/default/script-tag.http.html
@@ -0,0 +1,275 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "default"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "default"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "default"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "default"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "default"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "default"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "default"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "default"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "default"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "default"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "default"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "default"
+ }
+ ],
+ "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.meta/default/sharedworker-classic.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/default/sharedworker-classic.http.html
new file mode 100644
index 0000000000..5604a6fce3
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/default/sharedworker-classic.http.html
@@ -0,0 +1,65 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "default"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "default"
+ }
+ ],
+ "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.meta/default/sharedworker-module.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/default/sharedworker-module.http.html
new file mode 100644
index 0000000000..a9a5621054
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/default/sharedworker-module.http.html
@@ -0,0 +1,65 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "default"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "default"
+ }
+ ],
+ "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.meta/default/worker-classic.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/default/worker-classic.http.html
new file mode 100644
index 0000000000..08ed5a397b
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/default/worker-classic.http.html
@@ -0,0 +1,65 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "default"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "default"
+ }
+ ],
+ "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.meta/default/worker-module.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/default/worker-module.http.html
new file mode 100644
index 0000000000..ab2aeae082
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/default/worker-module.http.html
@@ -0,0 +1,65 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "default"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "default"
+ }
+ ],
+ "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.meta/default/xhr.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/default/xhr.http.html
new file mode 100644
index 0000000000..5ec19a8698
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/default/xhr.http.html
@@ -0,0 +1,275 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "default"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "default"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "default"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "default"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "default"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "default"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "default"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "default"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "default"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "default"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "default"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "default"
+ }
+ ],
+ "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.meta/never/a-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/never/a-tag.http.html
new file mode 100644
index 0000000000..b8cdba4dbe
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/never/a-tag.http.html
@@ -0,0 +1,107 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "omitted",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "never"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "never"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "never"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "never"
+ }
+ ],
+ "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.meta/never/fetch.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/never/fetch.http.html
new file mode 100644
index 0000000000..96e65d42a2
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/never/fetch.http.html
@@ -0,0 +1,275 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "omitted",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "never"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "never"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "never"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "never"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "never"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "never"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "never"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "never"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "never"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "never"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "never"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "never"
+ }
+ ],
+ "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.meta/never/iframe-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/never/iframe-tag.http.html
new file mode 100644
index 0000000000..ce657629a8
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/never/iframe-tag.http.html
@@ -0,0 +1,275 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "omitted",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "never"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "never"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "never"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "never"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "never"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "never"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "never"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "never"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "never"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "never"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "never"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "never"
+ }
+ ],
+ "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.meta/never/img-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/never/img-tag.http.html
new file mode 100644
index 0000000000..2fc2cfd0e7
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/never/img-tag.http.html
@@ -0,0 +1,275 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "omitted",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "never"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "never"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "never"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "never"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "never"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "never"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "never"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "never"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "never"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "never"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "never"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "never"
+ }
+ ],
+ "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.meta/never/script-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/never/script-tag.http.html
new file mode 100644
index 0000000000..f4c437a29b
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/never/script-tag.http.html
@@ -0,0 +1,275 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "omitted",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "never"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "never"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "never"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "never"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "never"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "never"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "never"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "never"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "never"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "never"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "never"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "never"
+ }
+ ],
+ "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.meta/never/sharedworker-classic.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/never/sharedworker-classic.http.html
new file mode 100644
index 0000000000..8e7eeec0d0
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/never/sharedworker-classic.http.html
@@ -0,0 +1,65 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "omitted",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "never"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "never"
+ }
+ ],
+ "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.meta/never/sharedworker-module.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/never/sharedworker-module.http.html
new file mode 100644
index 0000000000..89305f679b
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/never/sharedworker-module.http.html
@@ -0,0 +1,65 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "omitted",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "never"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "never"
+ }
+ ],
+ "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.meta/never/worker-classic.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/never/worker-classic.http.html
new file mode 100644
index 0000000000..7ac7de7d8a
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/never/worker-classic.http.html
@@ -0,0 +1,65 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "omitted",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "never"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "never"
+ }
+ ],
+ "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.meta/never/worker-module.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/never/worker-module.http.html
new file mode 100644
index 0000000000..9b3c0cd669
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/never/worker-module.http.html
@@ -0,0 +1,65 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "omitted",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "never"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "never"
+ }
+ ],
+ "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.meta/never/xhr.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/never/xhr.http.html
new file mode 100644
index 0000000000..35aafae708
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/never/xhr.http.html
@@ -0,0 +1,275 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "omitted",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "never"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "never"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "never"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "never"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "never"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "never"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "never"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "never"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "never"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "never"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "never"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "never"
+ }
+ ],
+ "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.meta/no-referrer-when-downgrade/a-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/no-referrer-when-downgrade/a-tag.http.html
new file mode 100644
index 0000000000..221717fd51
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/no-referrer-when-downgrade/a-tag.http.html
@@ -0,0 +1,107 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "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.meta/no-referrer-when-downgrade/fetch.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/no-referrer-when-downgrade/fetch.http.html
new file mode 100644
index 0000000000..bacd1b7876
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/no-referrer-when-downgrade/fetch.http.html
@@ -0,0 +1,275 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "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.meta/no-referrer-when-downgrade/iframe-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/no-referrer-when-downgrade/iframe-tag.http.html
new file mode 100644
index 0000000000..c9932cc82f
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/no-referrer-when-downgrade/iframe-tag.http.html
@@ -0,0 +1,275 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "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.meta/no-referrer-when-downgrade/img-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/no-referrer-when-downgrade/img-tag.http.html
new file mode 100644
index 0000000000..e67ff90d54
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/no-referrer-when-downgrade/img-tag.http.html
@@ -0,0 +1,275 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "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.meta/no-referrer-when-downgrade/script-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/no-referrer-when-downgrade/script-tag.http.html
new file mode 100644
index 0000000000..d54ad3eadf
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/no-referrer-when-downgrade/script-tag.http.html
@@ -0,0 +1,275 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "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.meta/no-referrer-when-downgrade/sharedworker-classic.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/no-referrer-when-downgrade/sharedworker-classic.http.html
new file mode 100644
index 0000000000..28926c71a5
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/no-referrer-when-downgrade/sharedworker-classic.http.html
@@ -0,0 +1,65 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "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.meta/no-referrer-when-downgrade/sharedworker-module.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/no-referrer-when-downgrade/sharedworker-module.http.html
new file mode 100644
index 0000000000..ab6f539a51
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/no-referrer-when-downgrade/sharedworker-module.http.html
@@ -0,0 +1,65 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "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.meta/no-referrer-when-downgrade/worker-classic.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/no-referrer-when-downgrade/worker-classic.http.html
new file mode 100644
index 0000000000..8585ad3ea9
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/no-referrer-when-downgrade/worker-classic.http.html
@@ -0,0 +1,65 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "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.meta/no-referrer-when-downgrade/worker-module.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/no-referrer-when-downgrade/worker-module.http.html
new file mode 100644
index 0000000000..2e7c9f55db
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/no-referrer-when-downgrade/worker-module.http.html
@@ -0,0 +1,65 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "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.meta/no-referrer-when-downgrade/xhr.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/no-referrer-when-downgrade/xhr.http.html
new file mode 100644
index 0000000000..839ddcd54f
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/no-referrer-when-downgrade/xhr.http.html
@@ -0,0 +1,275 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "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.meta/no-referrer/a-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/no-referrer/a-tag.http.html
new file mode 100644
index 0000000000..36341adda3
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/no-referrer/a-tag.http.html
@@ -0,0 +1,107 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "omitted",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "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.meta/no-referrer/fetch.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/no-referrer/fetch.http.html
new file mode 100644
index 0000000000..25451f4dde
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/no-referrer/fetch.http.html
@@ -0,0 +1,275 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "omitted",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "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.meta/no-referrer/iframe-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/no-referrer/iframe-tag.http.html
new file mode 100644
index 0000000000..c61d37eaf4
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/no-referrer/iframe-tag.http.html
@@ -0,0 +1,275 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "omitted",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "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.meta/no-referrer/img-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/no-referrer/img-tag.http.html
new file mode 100644
index 0000000000..11da083b28
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/no-referrer/img-tag.http.html
@@ -0,0 +1,275 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "omitted",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "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.meta/no-referrer/script-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/no-referrer/script-tag.http.html
new file mode 100644
index 0000000000..2212cb9a0c
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/no-referrer/script-tag.http.html
@@ -0,0 +1,275 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "omitted",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "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.meta/no-referrer/sharedworker-classic.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/no-referrer/sharedworker-classic.http.html
new file mode 100644
index 0000000000..8a740cf7b0
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/no-referrer/sharedworker-classic.http.html
@@ -0,0 +1,65 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "omitted",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "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.meta/no-referrer/sharedworker-module.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/no-referrer/sharedworker-module.http.html
new file mode 100644
index 0000000000..b09570e831
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/no-referrer/sharedworker-module.http.html
@@ -0,0 +1,65 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "omitted",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "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.meta/no-referrer/worker-classic.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/no-referrer/worker-classic.http.html
new file mode 100644
index 0000000000..4c2dafd3b1
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/no-referrer/worker-classic.http.html
@@ -0,0 +1,65 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "omitted",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "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.meta/no-referrer/worker-module.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/no-referrer/worker-module.http.html
new file mode 100644
index 0000000000..140ea2da6f
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/no-referrer/worker-module.http.html
@@ -0,0 +1,65 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "omitted",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "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.meta/no-referrer/xhr.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/no-referrer/xhr.http.html
new file mode 100644
index 0000000000..1bbb9c5c75
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/no-referrer/xhr.http.html
@@ -0,0 +1,275 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "omitted",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "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.meta/origin-when-cross-origin/a-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/origin-when-cross-origin/a-tag.http.html
new file mode 100644
index 0000000000..55edcd9de8
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/origin-when-cross-origin/a-tag.http.html
@@ -0,0 +1,107 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "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.meta/origin-when-cross-origin/fetch.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/origin-when-cross-origin/fetch.http.html
new file mode 100644
index 0000000000..d84f175f91
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/origin-when-cross-origin/fetch.http.html
@@ -0,0 +1,275 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "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.meta/origin-when-cross-origin/iframe-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/origin-when-cross-origin/iframe-tag.http.html
new file mode 100644
index 0000000000..4ca1c6a989
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/origin-when-cross-origin/iframe-tag.http.html
@@ -0,0 +1,275 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "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.meta/origin-when-cross-origin/img-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/origin-when-cross-origin/img-tag.http.html
new file mode 100644
index 0000000000..844c4ae4b2
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/origin-when-cross-origin/img-tag.http.html
@@ -0,0 +1,275 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "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.meta/origin-when-cross-origin/script-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/origin-when-cross-origin/script-tag.http.html
new file mode 100644
index 0000000000..51bf97a69f
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/origin-when-cross-origin/script-tag.http.html
@@ -0,0 +1,275 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "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.meta/origin-when-cross-origin/sharedworker-classic.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/origin-when-cross-origin/sharedworker-classic.http.html
new file mode 100644
index 0000000000..13c6acdcf1
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/origin-when-cross-origin/sharedworker-classic.http.html
@@ -0,0 +1,65 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "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.meta/origin-when-cross-origin/sharedworker-module.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/origin-when-cross-origin/sharedworker-module.http.html
new file mode 100644
index 0000000000..fdd5278b6b
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/origin-when-cross-origin/sharedworker-module.http.html
@@ -0,0 +1,65 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "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.meta/origin-when-cross-origin/worker-classic.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/origin-when-cross-origin/worker-classic.http.html
new file mode 100644
index 0000000000..a76af7cc30
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/origin-when-cross-origin/worker-classic.http.html
@@ -0,0 +1,65 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "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.meta/origin-when-cross-origin/worker-module.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/origin-when-cross-origin/worker-module.http.html
new file mode 100644
index 0000000000..068d2cbc93
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/origin-when-cross-origin/worker-module.http.html
@@ -0,0 +1,65 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "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.meta/origin-when-cross-origin/xhr.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/origin-when-cross-origin/xhr.http.html
new file mode 100644
index 0000000000..f30c204949
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/origin-when-cross-origin/xhr.http.html
@@ -0,0 +1,275 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "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.meta/origin-when-crossorigin/a-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/origin-when-crossorigin/a-tag.http.html
new file mode 100644
index 0000000000..c264ee5ff4
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/origin-when-crossorigin/a-tag.http.html
@@ -0,0 +1,107 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin-when-crossorigin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin-when-crossorigin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin-when-crossorigin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin-when-crossorigin"
+ }
+ ],
+ "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.meta/origin-when-crossorigin/fetch.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/origin-when-crossorigin/fetch.http.html
new file mode 100644
index 0000000000..4c243cf538
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/origin-when-crossorigin/fetch.http.html
@@ -0,0 +1,275 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin-when-crossorigin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin-when-crossorigin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin-when-crossorigin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin-when-crossorigin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin-when-crossorigin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin-when-crossorigin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin-when-crossorigin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin-when-crossorigin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin-when-crossorigin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin-when-crossorigin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin-when-crossorigin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin-when-crossorigin"
+ }
+ ],
+ "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.meta/origin-when-crossorigin/iframe-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/origin-when-crossorigin/iframe-tag.http.html
new file mode 100644
index 0000000000..36133bbfa8
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/origin-when-crossorigin/iframe-tag.http.html
@@ -0,0 +1,275 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin-when-crossorigin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin-when-crossorigin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin-when-crossorigin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin-when-crossorigin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin-when-crossorigin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin-when-crossorigin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin-when-crossorigin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin-when-crossorigin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin-when-crossorigin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin-when-crossorigin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin-when-crossorigin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin-when-crossorigin"
+ }
+ ],
+ "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.meta/origin-when-crossorigin/img-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/origin-when-crossorigin/img-tag.http.html
new file mode 100644
index 0000000000..5fd23123a7
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/origin-when-crossorigin/img-tag.http.html
@@ -0,0 +1,275 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin-when-crossorigin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin-when-crossorigin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin-when-crossorigin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin-when-crossorigin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin-when-crossorigin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin-when-crossorigin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin-when-crossorigin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin-when-crossorigin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin-when-crossorigin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin-when-crossorigin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin-when-crossorigin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin-when-crossorigin"
+ }
+ ],
+ "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.meta/origin-when-crossorigin/script-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/origin-when-crossorigin/script-tag.http.html
new file mode 100644
index 0000000000..3be6fef861
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/origin-when-crossorigin/script-tag.http.html
@@ -0,0 +1,275 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin-when-crossorigin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin-when-crossorigin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin-when-crossorigin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin-when-crossorigin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin-when-crossorigin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin-when-crossorigin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin-when-crossorigin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin-when-crossorigin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin-when-crossorigin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin-when-crossorigin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin-when-crossorigin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin-when-crossorigin"
+ }
+ ],
+ "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.meta/origin-when-crossorigin/sharedworker-classic.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/origin-when-crossorigin/sharedworker-classic.http.html
new file mode 100644
index 0000000000..c4644eefc4
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/origin-when-crossorigin/sharedworker-classic.http.html
@@ -0,0 +1,65 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin-when-crossorigin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin-when-crossorigin"
+ }
+ ],
+ "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.meta/origin-when-crossorigin/sharedworker-module.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/origin-when-crossorigin/sharedworker-module.http.html
new file mode 100644
index 0000000000..4b56d2ed14
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/origin-when-crossorigin/sharedworker-module.http.html
@@ -0,0 +1,65 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin-when-crossorigin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin-when-crossorigin"
+ }
+ ],
+ "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.meta/origin-when-crossorigin/worker-classic.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/origin-when-crossorigin/worker-classic.http.html
new file mode 100644
index 0000000000..b6db4e2ab7
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/origin-when-crossorigin/worker-classic.http.html
@@ -0,0 +1,65 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin-when-crossorigin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin-when-crossorigin"
+ }
+ ],
+ "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.meta/origin-when-crossorigin/worker-module.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/origin-when-crossorigin/worker-module.http.html
new file mode 100644
index 0000000000..ab6e4e7cb5
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/origin-when-crossorigin/worker-module.http.html
@@ -0,0 +1,65 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin-when-crossorigin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin-when-crossorigin"
+ }
+ ],
+ "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.meta/origin-when-crossorigin/xhr.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/origin-when-crossorigin/xhr.http.html
new file mode 100644
index 0000000000..1331914271
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/origin-when-crossorigin/xhr.http.html
@@ -0,0 +1,275 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin-when-crossorigin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin-when-crossorigin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin-when-crossorigin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin-when-crossorigin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin-when-crossorigin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin-when-crossorigin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin-when-crossorigin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin-when-crossorigin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin-when-crossorigin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin-when-crossorigin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin-when-crossorigin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin-when-crossorigin"
+ }
+ ],
+ "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.meta/origin/a-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/origin/a-tag.http.html
new file mode 100644
index 0000000000..fa1c52d316
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/origin/a-tag.http.html
@@ -0,0 +1,107 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "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.meta/origin/fetch.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/origin/fetch.http.html
new file mode 100644
index 0000000000..76f74a45ed
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/origin/fetch.http.html
@@ -0,0 +1,275 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "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.meta/origin/iframe-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/origin/iframe-tag.http.html
new file mode 100644
index 0000000000..ac0d2d4b5a
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/origin/iframe-tag.http.html
@@ -0,0 +1,275 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "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.meta/origin/img-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/origin/img-tag.http.html
new file mode 100644
index 0000000000..ffb9942b43
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/origin/img-tag.http.html
@@ -0,0 +1,275 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "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.meta/origin/script-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/origin/script-tag.http.html
new file mode 100644
index 0000000000..6ecc61936e
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/origin/script-tag.http.html
@@ -0,0 +1,275 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "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.meta/origin/sharedworker-classic.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/origin/sharedworker-classic.http.html
new file mode 100644
index 0000000000..aef03a0758
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/origin/sharedworker-classic.http.html
@@ -0,0 +1,65 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "origin",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "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.meta/origin/sharedworker-module.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/origin/sharedworker-module.http.html
new file mode 100644
index 0000000000..d75fc7ba6b
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/origin/sharedworker-module.http.html
@@ -0,0 +1,65 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "origin",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "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.meta/origin/worker-classic.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/origin/worker-classic.http.html
new file mode 100644
index 0000000000..9536f2d307
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/origin/worker-classic.http.html
@@ -0,0 +1,65 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "origin",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "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.meta/origin/worker-module.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/origin/worker-module.http.html
new file mode 100644
index 0000000000..51bf5ca950
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/origin/worker-module.http.html
@@ -0,0 +1,65 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "origin",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "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.meta/origin/xhr.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/origin/xhr.http.html
new file mode 100644
index 0000000000..956e6529aa
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/origin/xhr.http.html
@@ -0,0 +1,275 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "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.meta/same-origin/a-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/same-origin/a-tag.http.html
new file mode 100644
index 0000000000..f0fc5349fe
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/same-origin/a-tag.http.html
@@ -0,0 +1,86 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "omitted",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "same-origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "same-origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "same-origin"
+ }
+ ],
+ "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.meta/same-origin/fetch.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/same-origin/fetch.http.html
new file mode 100644
index 0000000000..332e19f9ed
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/same-origin/fetch.http.html
@@ -0,0 +1,233 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "omitted",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "same-origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "same-origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "same-origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "same-origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "same-origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "same-origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "same-origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "same-origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "same-origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "same-origin"
+ }
+ ],
+ "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.meta/same-origin/iframe-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/same-origin/iframe-tag.http.html
new file mode 100644
index 0000000000..656f25018c
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/same-origin/iframe-tag.http.html
@@ -0,0 +1,233 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "omitted",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "same-origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "same-origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "same-origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "same-origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "same-origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "same-origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "same-origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "same-origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "same-origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "same-origin"
+ }
+ ],
+ "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.meta/same-origin/img-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/same-origin/img-tag.http.html
new file mode 100644
index 0000000000..acc8899eea
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/same-origin/img-tag.http.html
@@ -0,0 +1,233 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "omitted",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "same-origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "same-origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "same-origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "same-origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "same-origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "same-origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "same-origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "same-origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "same-origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "same-origin"
+ }
+ ],
+ "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.meta/same-origin/script-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/same-origin/script-tag.http.html
new file mode 100644
index 0000000000..de1ca87708
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/same-origin/script-tag.http.html
@@ -0,0 +1,233 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "omitted",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "same-origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "same-origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "same-origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "same-origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "same-origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "same-origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "same-origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "same-origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "same-origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "same-origin"
+ }
+ ],
+ "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.meta/same-origin/sharedworker-classic.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/same-origin/sharedworker-classic.http.html
new file mode 100644
index 0000000000..23deb789aa
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/same-origin/sharedworker-classic.http.html
@@ -0,0 +1,65 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "same-origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "same-origin"
+ }
+ ],
+ "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.meta/same-origin/sharedworker-module.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/same-origin/sharedworker-module.http.html
new file mode 100644
index 0000000000..9f43c4f05b
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/same-origin/sharedworker-module.http.html
@@ -0,0 +1,65 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "same-origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "same-origin"
+ }
+ ],
+ "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.meta/same-origin/worker-classic.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/same-origin/worker-classic.http.html
new file mode 100644
index 0000000000..f67a5bc4c4
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/same-origin/worker-classic.http.html
@@ -0,0 +1,65 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "same-origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "same-origin"
+ }
+ ],
+ "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.meta/same-origin/worker-module.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/same-origin/worker-module.http.html
new file mode 100644
index 0000000000..0c37eaf6c6
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/same-origin/worker-module.http.html
@@ -0,0 +1,65 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "same-origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "same-origin"
+ }
+ ],
+ "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.meta/same-origin/xhr.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/same-origin/xhr.http.html
new file mode 100644
index 0000000000..ff82bc85eb
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/same-origin/xhr.http.html
@@ -0,0 +1,233 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "omitted",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "same-origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "same-origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "same-origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "same-origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "same-origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "same-origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "same-origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "same-origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "same-origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "same-origin"
+ }
+ ],
+ "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.meta/strict-origin-when-cross-origin/a-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/strict-origin-when-cross-origin/a-tag.http.html
new file mode 100644
index 0000000000..d3a807c97a
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/strict-origin-when-cross-origin/a-tag.http.html
@@ -0,0 +1,107 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "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.meta/strict-origin-when-cross-origin/fetch.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/strict-origin-when-cross-origin/fetch.http.html
new file mode 100644
index 0000000000..0e866479cc
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/strict-origin-when-cross-origin/fetch.http.html
@@ -0,0 +1,275 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "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.meta/strict-origin-when-cross-origin/iframe-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/strict-origin-when-cross-origin/iframe-tag.http.html
new file mode 100644
index 0000000000..0f9000679d
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/strict-origin-when-cross-origin/iframe-tag.http.html
@@ -0,0 +1,275 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "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.meta/strict-origin-when-cross-origin/img-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/strict-origin-when-cross-origin/img-tag.http.html
new file mode 100644
index 0000000000..7bbb7f38b3
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/strict-origin-when-cross-origin/img-tag.http.html
@@ -0,0 +1,275 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "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.meta/strict-origin-when-cross-origin/script-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/strict-origin-when-cross-origin/script-tag.http.html
new file mode 100644
index 0000000000..efeef07ca5
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/strict-origin-when-cross-origin/script-tag.http.html
@@ -0,0 +1,275 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "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.meta/strict-origin-when-cross-origin/sharedworker-classic.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/strict-origin-when-cross-origin/sharedworker-classic.http.html
new file mode 100644
index 0000000000..64f9fcb3a6
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/strict-origin-when-cross-origin/sharedworker-classic.http.html
@@ -0,0 +1,65 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "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.meta/strict-origin-when-cross-origin/sharedworker-module.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/strict-origin-when-cross-origin/sharedworker-module.http.html
new file mode 100644
index 0000000000..23751de3e8
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/strict-origin-when-cross-origin/sharedworker-module.http.html
@@ -0,0 +1,65 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "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.meta/strict-origin-when-cross-origin/worker-classic.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/strict-origin-when-cross-origin/worker-classic.http.html
new file mode 100644
index 0000000000..6489b91daf
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/strict-origin-when-cross-origin/worker-classic.http.html
@@ -0,0 +1,65 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "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.meta/strict-origin-when-cross-origin/worker-module.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/strict-origin-when-cross-origin/worker-module.http.html
new file mode 100644
index 0000000000..1a8b22a953
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/strict-origin-when-cross-origin/worker-module.http.html
@@ -0,0 +1,65 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "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.meta/strict-origin-when-cross-origin/xhr.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/strict-origin-when-cross-origin/xhr.http.html
new file mode 100644
index 0000000000..f960bd5455
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/strict-origin-when-cross-origin/xhr.http.html
@@ -0,0 +1,275 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "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.meta/strict-origin/a-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/strict-origin/a-tag.http.html
new file mode 100644
index 0000000000..66a0fa8080
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/strict-origin/a-tag.http.html
@@ -0,0 +1,107 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "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.meta/strict-origin/fetch.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/strict-origin/fetch.http.html
new file mode 100644
index 0000000000..502f76d365
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/strict-origin/fetch.http.html
@@ -0,0 +1,275 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "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.meta/strict-origin/iframe-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/strict-origin/iframe-tag.http.html
new file mode 100644
index 0000000000..bff0a0d8f0
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/strict-origin/iframe-tag.http.html
@@ -0,0 +1,275 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "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.meta/strict-origin/img-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/strict-origin/img-tag.http.html
new file mode 100644
index 0000000000..3fee582025
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/strict-origin/img-tag.http.html
@@ -0,0 +1,275 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "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.meta/strict-origin/script-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/strict-origin/script-tag.http.html
new file mode 100644
index 0000000000..2ef902cf34
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/strict-origin/script-tag.http.html
@@ -0,0 +1,275 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "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.meta/strict-origin/sharedworker-classic.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/strict-origin/sharedworker-classic.http.html
new file mode 100644
index 0000000000..3131640859
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/strict-origin/sharedworker-classic.http.html
@@ -0,0 +1,65 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "origin",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "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.meta/strict-origin/sharedworker-module.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/strict-origin/sharedworker-module.http.html
new file mode 100644
index 0000000000..8bf2c63bcc
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/strict-origin/sharedworker-module.http.html
@@ -0,0 +1,65 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "origin",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "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.meta/strict-origin/worker-classic.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/strict-origin/worker-classic.http.html
new file mode 100644
index 0000000000..9b32ab6983
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/strict-origin/worker-classic.http.html
@@ -0,0 +1,65 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "origin",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "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.meta/strict-origin/worker-module.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/strict-origin/worker-module.http.html
new file mode 100644
index 0000000000..0645126e62
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/strict-origin/worker-module.http.html
@@ -0,0 +1,65 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "origin",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "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.meta/strict-origin/xhr.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/strict-origin/xhr.http.html
new file mode 100644
index 0000000000..0734df429b
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/strict-origin/xhr.http.html
@@ -0,0 +1,275 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "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.meta/unsafe-url/a-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/unsafe-url/a-tag.http.html
new file mode 100644
index 0000000000..ca36059a24
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/unsafe-url/a-tag.http.html
@@ -0,0 +1,107 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="no-referrer">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "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.meta/unsafe-url/fetch.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/unsafe-url/fetch.http.html
new file mode 100644
index 0000000000..401163abef
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/unsafe-url/fetch.http.html
@@ -0,0 +1,275 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="no-referrer">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "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.meta/unsafe-url/iframe-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/unsafe-url/iframe-tag.http.html
new file mode 100644
index 0000000000..403a67545a
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/unsafe-url/iframe-tag.http.html
@@ -0,0 +1,275 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="no-referrer">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "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.meta/unsafe-url/img-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/unsafe-url/img-tag.http.html
new file mode 100644
index 0000000000..f06a89ddea
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/unsafe-url/img-tag.http.html
@@ -0,0 +1,275 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="no-referrer">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "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.meta/unsafe-url/script-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/unsafe-url/script-tag.http.html
new file mode 100644
index 0000000000..fba1aa8bcc
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/unsafe-url/script-tag.http.html
@@ -0,0 +1,275 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="no-referrer">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "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.meta/unsafe-url/sharedworker-classic.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/unsafe-url/sharedworker-classic.http.html
new file mode 100644
index 0000000000..3ba6d7450d
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/unsafe-url/sharedworker-classic.http.html
@@ -0,0 +1,65 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="no-referrer">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "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.meta/unsafe-url/sharedworker-module.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/unsafe-url/sharedworker-module.http.html
new file mode 100644
index 0000000000..c535aa1e16
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/unsafe-url/sharedworker-module.http.html
@@ -0,0 +1,65 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="no-referrer">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "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.meta/unsafe-url/worker-classic.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/unsafe-url/worker-classic.http.html
new file mode 100644
index 0000000000..ee2e2a7c6b
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/unsafe-url/worker-classic.http.html
@@ -0,0 +1,65 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="no-referrer">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "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.meta/unsafe-url/worker-module.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/unsafe-url/worker-module.http.html
new file mode 100644
index 0000000000..782cadd666
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/unsafe-url/worker-module.http.html
@@ -0,0 +1,65 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="no-referrer">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "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.meta/unsafe-url/xhr.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/unsafe-url/xhr.http.html
new file mode 100644
index 0000000000..199ced3e5e
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc.meta/unsafe-url/xhr.http.html
@@ -0,0 +1,275 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="no-referrer">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "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": [
+ {
+ "deliveryType": "meta",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "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/top.http-rp/no-referrer-when-downgrade/a-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/no-referrer-when-downgrade/a-tag.http.html
new file mode 100644
index 0000000000..67702eb925
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/no-referrer-when-downgrade/a-tag.http.html
@@ -0,0 +1,62 @@
+<!DOCTYPE html>
+<!-- DO 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": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "a-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for a-tag to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "a-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for a-tag to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "a-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for a-tag to same-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "a-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for a-tag to same-https origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/top.http-rp/no-referrer-when-downgrade/a-tag.http.html.headers b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/no-referrer-when-downgrade/a-tag.http.html.headers
new file mode 100644
index 0000000000..180358e691
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/no-referrer-when-downgrade/a-tag.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: no-referrer-when-downgrade
diff --git a/testing/web-platform/tests/referrer-policy/gen/top.http-rp/no-referrer-when-downgrade/fetch.http.html b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/no-referrer-when-downgrade/fetch.http.html
new file mode 100644
index 0000000000..5c2ed3836d
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/no-referrer-when-downgrade/fetch.http.html
@@ -0,0 +1,142 @@
+<!DOCTYPE html>
+<!-- DO 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": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-https origin and swap-origin redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/top.http-rp/no-referrer-when-downgrade/fetch.http.html.headers b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/no-referrer-when-downgrade/fetch.http.html.headers
new file mode 100644
index 0000000000..180358e691
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/no-referrer-when-downgrade/fetch.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: no-referrer-when-downgrade
diff --git a/testing/web-platform/tests/referrer-policy/gen/top.http-rp/no-referrer-when-downgrade/iframe-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/no-referrer-when-downgrade/iframe-tag.http.html
new file mode 100644
index 0000000000..26d595fcc6
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/no-referrer-when-downgrade/iframe-tag.http.html
@@ -0,0 +1,142 @@
+<!DOCTYPE html>
+<!-- DO 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": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-https origin and swap-origin redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/top.http-rp/no-referrer-when-downgrade/iframe-tag.http.html.headers b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/no-referrer-when-downgrade/iframe-tag.http.html.headers
new file mode 100644
index 0000000000..180358e691
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/no-referrer-when-downgrade/iframe-tag.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: no-referrer-when-downgrade
diff --git a/testing/web-platform/tests/referrer-policy/gen/top.http-rp/no-referrer-when-downgrade/img-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/no-referrer-when-downgrade/img-tag.http.html
new file mode 100644
index 0000000000..0827ebde9c
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/no-referrer-when-downgrade/img-tag.http.html
@@ -0,0 +1,142 @@
+<!DOCTYPE html>
+<!-- DO 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": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-https origin and swap-origin redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/top.http-rp/no-referrer-when-downgrade/img-tag.http.html.headers b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/no-referrer-when-downgrade/img-tag.http.html.headers
new file mode 100644
index 0000000000..180358e691
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/no-referrer-when-downgrade/img-tag.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: no-referrer-when-downgrade
diff --git a/testing/web-platform/tests/referrer-policy/gen/top.http-rp/no-referrer-when-downgrade/script-tag-dynamic-import.http.html b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/no-referrer-when-downgrade/script-tag-dynamic-import.http.html
new file mode 100644
index 0000000000..4009fe6a61
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/no-referrer-when-downgrade/script-tag-dynamic-import.http.html
@@ -0,0 +1,142 @@
+<!DOCTYPE html>
+<!-- DO 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": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag-dynamic-import to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag-dynamic-import to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag-dynamic-import to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag-dynamic-import to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag-dynamic-import to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag-dynamic-import to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag-dynamic-import to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag-dynamic-import to same-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag-dynamic-import to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag-dynamic-import to same-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag-dynamic-import to same-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag-dynamic-import to same-https origin and swap-origin redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/top.http-rp/no-referrer-when-downgrade/script-tag-dynamic-import.http.html.headers b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/no-referrer-when-downgrade/script-tag-dynamic-import.http.html.headers
new file mode 100644
index 0000000000..180358e691
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/no-referrer-when-downgrade/script-tag-dynamic-import.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: no-referrer-when-downgrade
diff --git a/testing/web-platform/tests/referrer-policy/gen/top.http-rp/no-referrer-when-downgrade/script-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/no-referrer-when-downgrade/script-tag.http.html
new file mode 100644
index 0000000000..c5cad6a043
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/no-referrer-when-downgrade/script-tag.http.html
@@ -0,0 +1,142 @@
+<!DOCTYPE html>
+<!-- DO 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": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-https origin and swap-origin redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/top.http-rp/no-referrer-when-downgrade/script-tag.http.html.headers b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/no-referrer-when-downgrade/script-tag.http.html.headers
new file mode 100644
index 0000000000..180358e691
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/no-referrer-when-downgrade/script-tag.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: no-referrer-when-downgrade
diff --git a/testing/web-platform/tests/referrer-policy/gen/top.http-rp/no-referrer-when-downgrade/sharedworker-classic.http.html b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/no-referrer-when-downgrade/sharedworker-classic.http.html
new file mode 100644
index 0000000000..1bc6f04b8c
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/no-referrer-when-downgrade/sharedworker-classic.http.html
@@ -0,0 +1,42 @@
+<!DOCTYPE html>
+<!-- DO 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": [],
+ "source_scheme": "http",
+ "subresource": "sharedworker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for sharedworker-classic to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "sharedworker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for sharedworker-classic to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/top.http-rp/no-referrer-when-downgrade/sharedworker-classic.http.html.headers b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/no-referrer-when-downgrade/sharedworker-classic.http.html.headers
new file mode 100644
index 0000000000..180358e691
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/no-referrer-when-downgrade/sharedworker-classic.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: no-referrer-when-downgrade
diff --git a/testing/web-platform/tests/referrer-policy/gen/top.http-rp/no-referrer-when-downgrade/sharedworker-module.http.html b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/no-referrer-when-downgrade/sharedworker-module.http.html
new file mode 100644
index 0000000000..a24ee872ad
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/no-referrer-when-downgrade/sharedworker-module.http.html
@@ -0,0 +1,42 @@
+<!DOCTYPE html>
+<!-- DO 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": [],
+ "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": [],
+ "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/top.http-rp/no-referrer-when-downgrade/sharedworker-module.http.html.headers b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/no-referrer-when-downgrade/sharedworker-module.http.html.headers
new file mode 100644
index 0000000000..180358e691
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/no-referrer-when-downgrade/sharedworker-module.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: no-referrer-when-downgrade
diff --git a/testing/web-platform/tests/referrer-policy/gen/top.http-rp/no-referrer-when-downgrade/worker-classic.http.html b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/no-referrer-when-downgrade/worker-classic.http.html
new file mode 100644
index 0000000000..7e6e8f3c5f
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/no-referrer-when-downgrade/worker-classic.http.html
@@ -0,0 +1,42 @@
+<!DOCTYPE html>
+<!-- DO 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": [],
+ "source_scheme": "http",
+ "subresource": "worker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-classic to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "worker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-classic to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/top.http-rp/no-referrer-when-downgrade/worker-classic.http.html.headers b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/no-referrer-when-downgrade/worker-classic.http.html.headers
new file mode 100644
index 0000000000..180358e691
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/no-referrer-when-downgrade/worker-classic.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: no-referrer-when-downgrade
diff --git a/testing/web-platform/tests/referrer-policy/gen/top.http-rp/no-referrer-when-downgrade/worker-module.http.html b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/no-referrer-when-downgrade/worker-module.http.html
new file mode 100644
index 0000000000..ae453ee0f0
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/no-referrer-when-downgrade/worker-module.http.html
@@ -0,0 +1,42 @@
+<!DOCTYPE html>
+<!-- DO 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": [],
+ "source_scheme": "http",
+ "subresource": "worker-module",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-module to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "worker-module",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-module to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/top.http-rp/no-referrer-when-downgrade/worker-module.http.html.headers b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/no-referrer-when-downgrade/worker-module.http.html.headers
new file mode 100644
index 0000000000..180358e691
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/no-referrer-when-downgrade/worker-module.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: no-referrer-when-downgrade
diff --git a/testing/web-platform/tests/referrer-policy/gen/top.http-rp/no-referrer-when-downgrade/xhr.http.html b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/no-referrer-when-downgrade/xhr.http.html
new file mode 100644
index 0000000000..b3380b89ba
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/no-referrer-when-downgrade/xhr.http.html
@@ -0,0 +1,142 @@
+<!DOCTYPE html>
+<!-- DO 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": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-https origin and swap-origin redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/top.http-rp/no-referrer-when-downgrade/xhr.http.html.headers b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/no-referrer-when-downgrade/xhr.http.html.headers
new file mode 100644
index 0000000000..180358e691
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/no-referrer-when-downgrade/xhr.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: no-referrer-when-downgrade
diff --git a/testing/web-platform/tests/referrer-policy/gen/top.http-rp/no-referrer/a-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/no-referrer/a-tag.http.html
new file mode 100644
index 0000000000..29adaac66b
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/no-referrer/a-tag.http.html
@@ -0,0 +1,62 @@
+<!DOCTYPE html>
+<!-- DO 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": "omitted",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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/top.http-rp/no-referrer/a-tag.http.html.headers b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/no-referrer/a-tag.http.html.headers
new file mode 100644
index 0000000000..b3b55087ed
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/no-referrer/a-tag.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: no-referrer
diff --git a/testing/web-platform/tests/referrer-policy/gen/top.http-rp/no-referrer/fetch.http.html b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/no-referrer/fetch.http.html
new file mode 100644
index 0000000000..d6ac45a728
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/no-referrer/fetch.http.html
@@ -0,0 +1,142 @@
+<!DOCTYPE html>
+<!-- DO 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": "omitted",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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/top.http-rp/no-referrer/fetch.http.html.headers b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/no-referrer/fetch.http.html.headers
new file mode 100644
index 0000000000..b3b55087ed
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/no-referrer/fetch.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: no-referrer
diff --git a/testing/web-platform/tests/referrer-policy/gen/top.http-rp/no-referrer/iframe-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/no-referrer/iframe-tag.http.html
new file mode 100644
index 0000000000..d39830b579
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/no-referrer/iframe-tag.http.html
@@ -0,0 +1,142 @@
+<!DOCTYPE html>
+<!-- DO 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": "omitted",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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/top.http-rp/no-referrer/iframe-tag.http.html.headers b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/no-referrer/iframe-tag.http.html.headers
new file mode 100644
index 0000000000..b3b55087ed
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/no-referrer/iframe-tag.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: no-referrer
diff --git a/testing/web-platform/tests/referrer-policy/gen/top.http-rp/no-referrer/img-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/no-referrer/img-tag.http.html
new file mode 100644
index 0000000000..566c3252ec
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/no-referrer/img-tag.http.html
@@ -0,0 +1,142 @@
+<!DOCTYPE html>
+<!-- DO 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": "omitted",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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/top.http-rp/no-referrer/img-tag.http.html.headers b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/no-referrer/img-tag.http.html.headers
new file mode 100644
index 0000000000..b3b55087ed
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/no-referrer/img-tag.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: no-referrer
diff --git a/testing/web-platform/tests/referrer-policy/gen/top.http-rp/no-referrer/script-tag-dynamic-import.http.html b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/no-referrer/script-tag-dynamic-import.http.html
new file mode 100644
index 0000000000..25db2c0115
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/no-referrer/script-tag-dynamic-import.http.html
@@ -0,0 +1,142 @@
+<!DOCTYPE html>
+<!-- DO 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": "omitted",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for script-tag-dynamic-import to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for script-tag-dynamic-import to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for script-tag-dynamic-import to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for script-tag-dynamic-import to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for script-tag-dynamic-import to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for script-tag-dynamic-import to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for script-tag-dynamic-import to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for script-tag-dynamic-import to same-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for script-tag-dynamic-import to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "same-https",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for script-tag-dynamic-import to same-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for script-tag-dynamic-import to same-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for script-tag-dynamic-import to same-https origin and swap-origin redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/top.http-rp/no-referrer/script-tag-dynamic-import.http.html.headers b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/no-referrer/script-tag-dynamic-import.http.html.headers
new file mode 100644
index 0000000000..b3b55087ed
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/no-referrer/script-tag-dynamic-import.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: no-referrer
diff --git a/testing/web-platform/tests/referrer-policy/gen/top.http-rp/no-referrer/script-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/no-referrer/script-tag.http.html
new file mode 100644
index 0000000000..63e54ba482
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/no-referrer/script-tag.http.html
@@ -0,0 +1,142 @@
+<!DOCTYPE html>
+<!-- DO 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": "omitted",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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/top.http-rp/no-referrer/script-tag.http.html.headers b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/no-referrer/script-tag.http.html.headers
new file mode 100644
index 0000000000..b3b55087ed
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/no-referrer/script-tag.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: no-referrer
diff --git a/testing/web-platform/tests/referrer-policy/gen/top.http-rp/no-referrer/sharedworker-classic.http.html b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/no-referrer/sharedworker-classic.http.html
new file mode 100644
index 0000000000..25bbdd1a08
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/no-referrer/sharedworker-classic.http.html
@@ -0,0 +1,42 @@
+<!DOCTYPE html>
+<!-- DO 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": "omitted",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "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": [],
+ "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/top.http-rp/no-referrer/sharedworker-classic.http.html.headers b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/no-referrer/sharedworker-classic.http.html.headers
new file mode 100644
index 0000000000..b3b55087ed
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/no-referrer/sharedworker-classic.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: no-referrer
diff --git a/testing/web-platform/tests/referrer-policy/gen/top.http-rp/no-referrer/sharedworker-module.http.html b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/no-referrer/sharedworker-module.http.html
new file mode 100644
index 0000000000..5845fa807d
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/no-referrer/sharedworker-module.http.html
@@ -0,0 +1,42 @@
+<!DOCTYPE html>
+<!-- DO 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": "omitted",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "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": [],
+ "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/top.http-rp/no-referrer/sharedworker-module.http.html.headers b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/no-referrer/sharedworker-module.http.html.headers
new file mode 100644
index 0000000000..b3b55087ed
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/no-referrer/sharedworker-module.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: no-referrer
diff --git a/testing/web-platform/tests/referrer-policy/gen/top.http-rp/no-referrer/worker-classic.http.html b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/no-referrer/worker-classic.http.html
new file mode 100644
index 0000000000..7297e57a64
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/no-referrer/worker-classic.http.html
@@ -0,0 +1,42 @@
+<!DOCTYPE html>
+<!-- DO 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": "omitted",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "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": [],
+ "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/top.http-rp/no-referrer/worker-classic.http.html.headers b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/no-referrer/worker-classic.http.html.headers
new file mode 100644
index 0000000000..b3b55087ed
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/no-referrer/worker-classic.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: no-referrer
diff --git a/testing/web-platform/tests/referrer-policy/gen/top.http-rp/no-referrer/worker-module.http.html b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/no-referrer/worker-module.http.html
new file mode 100644
index 0000000000..03fb43a1a1
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/no-referrer/worker-module.http.html
@@ -0,0 +1,42 @@
+<!DOCTYPE html>
+<!-- DO 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": "omitted",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "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": [],
+ "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/top.http-rp/no-referrer/worker-module.http.html.headers b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/no-referrer/worker-module.http.html.headers
new file mode 100644
index 0000000000..b3b55087ed
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/no-referrer/worker-module.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: no-referrer
diff --git a/testing/web-platform/tests/referrer-policy/gen/top.http-rp/no-referrer/xhr.http.html b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/no-referrer/xhr.http.html
new file mode 100644
index 0000000000..f80b28b5cb
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/no-referrer/xhr.http.html
@@ -0,0 +1,142 @@
+<!DOCTYPE html>
+<!-- DO 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": "omitted",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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/top.http-rp/no-referrer/xhr.http.html.headers b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/no-referrer/xhr.http.html.headers
new file mode 100644
index 0000000000..b3b55087ed
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/no-referrer/xhr.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: no-referrer
diff --git a/testing/web-platform/tests/referrer-policy/gen/top.http-rp/origin-when-cross-origin/a-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/origin-when-cross-origin/a-tag.http.html
new file mode 100644
index 0000000000..72e159c72e
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/origin-when-cross-origin/a-tag.http.html
@@ -0,0 +1,62 @@
+<!DOCTYPE html>
+<!-- DO 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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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/top.http-rp/origin-when-cross-origin/a-tag.http.html.headers b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/origin-when-cross-origin/a-tag.http.html.headers
new file mode 100644
index 0000000000..a15ea7c65c
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/origin-when-cross-origin/a-tag.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: origin-when-cross-origin
diff --git a/testing/web-platform/tests/referrer-policy/gen/top.http-rp/origin-when-cross-origin/fetch.http.html b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/origin-when-cross-origin/fetch.http.html
new file mode 100644
index 0000000000..1dfb592eeb
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/origin-when-cross-origin/fetch.http.html
@@ -0,0 +1,142 @@
+<!DOCTYPE html>
+<!-- DO 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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/top.http-rp/origin-when-cross-origin/fetch.http.html.headers b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/origin-when-cross-origin/fetch.http.html.headers
new file mode 100644
index 0000000000..a15ea7c65c
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/origin-when-cross-origin/fetch.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: origin-when-cross-origin
diff --git a/testing/web-platform/tests/referrer-policy/gen/top.http-rp/origin-when-cross-origin/iframe-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/origin-when-cross-origin/iframe-tag.http.html
new file mode 100644
index 0000000000..557d6a5323
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/origin-when-cross-origin/iframe-tag.http.html
@@ -0,0 +1,142 @@
+<!DOCTYPE html>
+<!-- DO 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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/top.http-rp/origin-when-cross-origin/iframe-tag.http.html.headers b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/origin-when-cross-origin/iframe-tag.http.html.headers
new file mode 100644
index 0000000000..a15ea7c65c
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/origin-when-cross-origin/iframe-tag.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: origin-when-cross-origin
diff --git a/testing/web-platform/tests/referrer-policy/gen/top.http-rp/origin-when-cross-origin/img-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/origin-when-cross-origin/img-tag.http.html
new file mode 100644
index 0000000000..3987df1518
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/origin-when-cross-origin/img-tag.http.html
@@ -0,0 +1,142 @@
+<!DOCTYPE html>
+<!-- DO 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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/top.http-rp/origin-when-cross-origin/img-tag.http.html.headers b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/origin-when-cross-origin/img-tag.http.html.headers
new file mode 100644
index 0000000000..a15ea7c65c
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/origin-when-cross-origin/img-tag.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: origin-when-cross-origin
diff --git a/testing/web-platform/tests/referrer-policy/gen/top.http-rp/origin-when-cross-origin/script-tag-dynamic-import.http.html b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/origin-when-cross-origin/script-tag-dynamic-import.http.html
new file mode 100644
index 0000000000..6444480eb9
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/origin-when-cross-origin/script-tag-dynamic-import.http.html
@@ -0,0 +1,142 @@
+<!DOCTYPE html>
+<!-- DO 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": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for script-tag-dynamic-import to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for script-tag-dynamic-import to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for script-tag-dynamic-import to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for script-tag-dynamic-import to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for script-tag-dynamic-import to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for script-tag-dynamic-import to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for script-tag-dynamic-import to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for script-tag-dynamic-import to same-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for script-tag-dynamic-import to same-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for script-tag-dynamic-import to same-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag-dynamic-import to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag-dynamic-import to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/top.http-rp/origin-when-cross-origin/script-tag-dynamic-import.http.html.headers b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/origin-when-cross-origin/script-tag-dynamic-import.http.html.headers
new file mode 100644
index 0000000000..a15ea7c65c
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/origin-when-cross-origin/script-tag-dynamic-import.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: origin-when-cross-origin
diff --git a/testing/web-platform/tests/referrer-policy/gen/top.http-rp/origin-when-cross-origin/script-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/origin-when-cross-origin/script-tag.http.html
new file mode 100644
index 0000000000..788c8d04f2
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/origin-when-cross-origin/script-tag.http.html
@@ -0,0 +1,142 @@
+<!DOCTYPE html>
+<!-- DO 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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/top.http-rp/origin-when-cross-origin/script-tag.http.html.headers b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/origin-when-cross-origin/script-tag.http.html.headers
new file mode 100644
index 0000000000..a15ea7c65c
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/origin-when-cross-origin/script-tag.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: origin-when-cross-origin
diff --git a/testing/web-platform/tests/referrer-policy/gen/top.http-rp/origin-when-cross-origin/sharedworker-classic.http.html b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/origin-when-cross-origin/sharedworker-classic.http.html
new file mode 100644
index 0000000000..1bc6f04b8c
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/origin-when-cross-origin/sharedworker-classic.http.html
@@ -0,0 +1,42 @@
+<!DOCTYPE html>
+<!-- DO 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": [],
+ "source_scheme": "http",
+ "subresource": "sharedworker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for sharedworker-classic to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "sharedworker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for sharedworker-classic to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/top.http-rp/origin-when-cross-origin/sharedworker-classic.http.html.headers b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/origin-when-cross-origin/sharedworker-classic.http.html.headers
new file mode 100644
index 0000000000..a15ea7c65c
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/origin-when-cross-origin/sharedworker-classic.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: origin-when-cross-origin
diff --git a/testing/web-platform/tests/referrer-policy/gen/top.http-rp/origin-when-cross-origin/sharedworker-module.http.html b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/origin-when-cross-origin/sharedworker-module.http.html
new file mode 100644
index 0000000000..a24ee872ad
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/origin-when-cross-origin/sharedworker-module.http.html
@@ -0,0 +1,42 @@
+<!DOCTYPE html>
+<!-- DO 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": [],
+ "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": [],
+ "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/top.http-rp/origin-when-cross-origin/sharedworker-module.http.html.headers b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/origin-when-cross-origin/sharedworker-module.http.html.headers
new file mode 100644
index 0000000000..a15ea7c65c
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/origin-when-cross-origin/sharedworker-module.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: origin-when-cross-origin
diff --git a/testing/web-platform/tests/referrer-policy/gen/top.http-rp/origin-when-cross-origin/worker-classic.http.html b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/origin-when-cross-origin/worker-classic.http.html
new file mode 100644
index 0000000000..7e6e8f3c5f
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/origin-when-cross-origin/worker-classic.http.html
@@ -0,0 +1,42 @@
+<!DOCTYPE html>
+<!-- DO 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": [],
+ "source_scheme": "http",
+ "subresource": "worker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-classic to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "worker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-classic to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/top.http-rp/origin-when-cross-origin/worker-classic.http.html.headers b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/origin-when-cross-origin/worker-classic.http.html.headers
new file mode 100644
index 0000000000..a15ea7c65c
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/origin-when-cross-origin/worker-classic.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: origin-when-cross-origin
diff --git a/testing/web-platform/tests/referrer-policy/gen/top.http-rp/origin-when-cross-origin/worker-module.http.html b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/origin-when-cross-origin/worker-module.http.html
new file mode 100644
index 0000000000..ae453ee0f0
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/origin-when-cross-origin/worker-module.http.html
@@ -0,0 +1,42 @@
+<!DOCTYPE html>
+<!-- DO 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": [],
+ "source_scheme": "http",
+ "subresource": "worker-module",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-module to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "worker-module",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-module to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/top.http-rp/origin-when-cross-origin/worker-module.http.html.headers b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/origin-when-cross-origin/worker-module.http.html.headers
new file mode 100644
index 0000000000..a15ea7c65c
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/origin-when-cross-origin/worker-module.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: origin-when-cross-origin
diff --git a/testing/web-platform/tests/referrer-policy/gen/top.http-rp/origin-when-cross-origin/xhr.http.html b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/origin-when-cross-origin/xhr.http.html
new file mode 100644
index 0000000000..866577c336
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/origin-when-cross-origin/xhr.http.html
@@ -0,0 +1,142 @@
+<!DOCTYPE html>
+<!-- DO 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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/top.http-rp/origin-when-cross-origin/xhr.http.html.headers b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/origin-when-cross-origin/xhr.http.html.headers
new file mode 100644
index 0000000000..a15ea7c65c
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/origin-when-cross-origin/xhr.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: origin-when-cross-origin
diff --git a/testing/web-platform/tests/referrer-policy/gen/top.http-rp/origin/a-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/origin/a-tag.http.html
new file mode 100644
index 0000000000..496521351a
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/origin/a-tag.http.html
@@ -0,0 +1,62 @@
+<!DOCTYPE html>
+<!-- DO 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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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/top.http-rp/origin/a-tag.http.html.headers b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/origin/a-tag.http.html.headers
new file mode 100644
index 0000000000..ecff74b90d
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/origin/a-tag.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: origin
diff --git a/testing/web-platform/tests/referrer-policy/gen/top.http-rp/origin/fetch.http.html b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/origin/fetch.http.html
new file mode 100644
index 0000000000..b4d0161739
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/origin/fetch.http.html
@@ -0,0 +1,142 @@
+<!DOCTYPE html>
+<!-- DO 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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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/top.http-rp/origin/fetch.http.html.headers b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/origin/fetch.http.html.headers
new file mode 100644
index 0000000000..ecff74b90d
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/origin/fetch.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: origin
diff --git a/testing/web-platform/tests/referrer-policy/gen/top.http-rp/origin/iframe-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/origin/iframe-tag.http.html
new file mode 100644
index 0000000000..e2eb629831
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/origin/iframe-tag.http.html
@@ -0,0 +1,142 @@
+<!DOCTYPE html>
+<!-- DO 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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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/top.http-rp/origin/iframe-tag.http.html.headers b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/origin/iframe-tag.http.html.headers
new file mode 100644
index 0000000000..ecff74b90d
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/origin/iframe-tag.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: origin
diff --git a/testing/web-platform/tests/referrer-policy/gen/top.http-rp/origin/img-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/origin/img-tag.http.html
new file mode 100644
index 0000000000..f0c99d563a
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/origin/img-tag.http.html
@@ -0,0 +1,142 @@
+<!DOCTYPE html>
+<!-- DO 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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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/top.http-rp/origin/img-tag.http.html.headers b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/origin/img-tag.http.html.headers
new file mode 100644
index 0000000000..ecff74b90d
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/origin/img-tag.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: origin
diff --git a/testing/web-platform/tests/referrer-policy/gen/top.http-rp/origin/script-tag-dynamic-import.http.html b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/origin/script-tag-dynamic-import.http.html
new file mode 100644
index 0000000000..4e754dcebc
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/origin/script-tag-dynamic-import.http.html
@@ -0,0 +1,142 @@
+<!DOCTYPE html>
+<!-- DO 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": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for script-tag-dynamic-import to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for script-tag-dynamic-import to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for script-tag-dynamic-import to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for script-tag-dynamic-import to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for script-tag-dynamic-import to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for script-tag-dynamic-import to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for script-tag-dynamic-import to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for script-tag-dynamic-import to same-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for script-tag-dynamic-import to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for script-tag-dynamic-import to same-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for script-tag-dynamic-import to same-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for script-tag-dynamic-import to same-https origin and swap-origin redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/top.http-rp/origin/script-tag-dynamic-import.http.html.headers b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/origin/script-tag-dynamic-import.http.html.headers
new file mode 100644
index 0000000000..ecff74b90d
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/origin/script-tag-dynamic-import.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: origin
diff --git a/testing/web-platform/tests/referrer-policy/gen/top.http-rp/origin/script-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/origin/script-tag.http.html
new file mode 100644
index 0000000000..f41884b684
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/origin/script-tag.http.html
@@ -0,0 +1,142 @@
+<!DOCTYPE html>
+<!-- DO 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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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/top.http-rp/origin/script-tag.http.html.headers b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/origin/script-tag.http.html.headers
new file mode 100644
index 0000000000..ecff74b90d
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/origin/script-tag.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: origin
diff --git a/testing/web-platform/tests/referrer-policy/gen/top.http-rp/origin/sharedworker-classic.http.html b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/origin/sharedworker-classic.http.html
new file mode 100644
index 0000000000..24eeee8188
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/origin/sharedworker-classic.http.html
@@ -0,0 +1,42 @@
+<!DOCTYPE html>
+<!-- DO 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": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "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": [],
+ "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/top.http-rp/origin/sharedworker-classic.http.html.headers b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/origin/sharedworker-classic.http.html.headers
new file mode 100644
index 0000000000..ecff74b90d
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/origin/sharedworker-classic.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: origin
diff --git a/testing/web-platform/tests/referrer-policy/gen/top.http-rp/origin/sharedworker-module.http.html b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/origin/sharedworker-module.http.html
new file mode 100644
index 0000000000..ff1170a108
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/origin/sharedworker-module.http.html
@@ -0,0 +1,42 @@
+<!DOCTYPE html>
+<!-- DO 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": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "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": [],
+ "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/top.http-rp/origin/sharedworker-module.http.html.headers b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/origin/sharedworker-module.http.html.headers
new file mode 100644
index 0000000000..ecff74b90d
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/origin/sharedworker-module.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: origin
diff --git a/testing/web-platform/tests/referrer-policy/gen/top.http-rp/origin/worker-classic.http.html b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/origin/worker-classic.http.html
new file mode 100644
index 0000000000..4e9a4c4911
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/origin/worker-classic.http.html
@@ -0,0 +1,42 @@
+<!DOCTYPE html>
+<!-- DO 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": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "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": [],
+ "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/top.http-rp/origin/worker-classic.http.html.headers b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/origin/worker-classic.http.html.headers
new file mode 100644
index 0000000000..ecff74b90d
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/origin/worker-classic.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: origin
diff --git a/testing/web-platform/tests/referrer-policy/gen/top.http-rp/origin/worker-module.http.html b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/origin/worker-module.http.html
new file mode 100644
index 0000000000..57ce11f6f9
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/origin/worker-module.http.html
@@ -0,0 +1,42 @@
+<!DOCTYPE html>
+<!-- DO 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": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "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": [],
+ "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/top.http-rp/origin/worker-module.http.html.headers b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/origin/worker-module.http.html.headers
new file mode 100644
index 0000000000..ecff74b90d
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/origin/worker-module.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: origin
diff --git a/testing/web-platform/tests/referrer-policy/gen/top.http-rp/origin/xhr.http.html b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/origin/xhr.http.html
new file mode 100644
index 0000000000..e1d6b7a798
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/origin/xhr.http.html
@@ -0,0 +1,142 @@
+<!DOCTYPE html>
+<!-- DO 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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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/top.http-rp/origin/xhr.http.html.headers b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/origin/xhr.http.html.headers
new file mode 100644
index 0000000000..ecff74b90d
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/origin/xhr.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: origin
diff --git a/testing/web-platform/tests/referrer-policy/gen/top.http-rp/same-origin/a-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/same-origin/a-tag.http.html
new file mode 100644
index 0000000000..563e63e4a0
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/same-origin/a-tag.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": "omitted",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "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": [],
+ "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": [],
+ "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/top.http-rp/same-origin/a-tag.http.html.headers b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/same-origin/a-tag.http.html.headers
new file mode 100644
index 0000000000..be66cf9321
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/same-origin/a-tag.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: same-origin
diff --git a/testing/web-platform/tests/referrer-policy/gen/top.http-rp/same-origin/fetch.http.html b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/same-origin/fetch.http.html
new file mode 100644
index 0000000000..bc673974f3
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/same-origin/fetch.http.html
@@ -0,0 +1,122 @@
+<!DOCTYPE html>
+<!-- DO 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": "omitted",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/top.http-rp/same-origin/fetch.http.html.headers b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/same-origin/fetch.http.html.headers
new file mode 100644
index 0000000000..be66cf9321
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/same-origin/fetch.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: same-origin
diff --git a/testing/web-platform/tests/referrer-policy/gen/top.http-rp/same-origin/iframe-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/same-origin/iframe-tag.http.html
new file mode 100644
index 0000000000..50e3b2e755
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/same-origin/iframe-tag.http.html
@@ -0,0 +1,122 @@
+<!DOCTYPE html>
+<!-- DO 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": "omitted",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/top.http-rp/same-origin/iframe-tag.http.html.headers b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/same-origin/iframe-tag.http.html.headers
new file mode 100644
index 0000000000..be66cf9321
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/same-origin/iframe-tag.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: same-origin
diff --git a/testing/web-platform/tests/referrer-policy/gen/top.http-rp/same-origin/img-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/same-origin/img-tag.http.html
new file mode 100644
index 0000000000..2f106e6e89
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/same-origin/img-tag.http.html
@@ -0,0 +1,122 @@
+<!DOCTYPE html>
+<!-- DO 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": "omitted",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/top.http-rp/same-origin/img-tag.http.html.headers b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/same-origin/img-tag.http.html.headers
new file mode 100644
index 0000000000..be66cf9321
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/same-origin/img-tag.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: same-origin
diff --git a/testing/web-platform/tests/referrer-policy/gen/top.http-rp/same-origin/script-tag-dynamic-import.http.html b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/same-origin/script-tag-dynamic-import.http.html
new file mode 100644
index 0000000000..4db1827eb3
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/same-origin/script-tag-dynamic-import.http.html
@@ -0,0 +1,122 @@
+<!DOCTYPE html>
+<!-- DO 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": "omitted",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for script-tag-dynamic-import to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for script-tag-dynamic-import to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for script-tag-dynamic-import to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for script-tag-dynamic-import to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for script-tag-dynamic-import to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for script-tag-dynamic-import to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for script-tag-dynamic-import to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for script-tag-dynamic-import to same-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag-dynamic-import to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag-dynamic-import to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/top.http-rp/same-origin/script-tag-dynamic-import.http.html.headers b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/same-origin/script-tag-dynamic-import.http.html.headers
new file mode 100644
index 0000000000..be66cf9321
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/same-origin/script-tag-dynamic-import.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: same-origin
diff --git a/testing/web-platform/tests/referrer-policy/gen/top.http-rp/same-origin/script-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/same-origin/script-tag.http.html
new file mode 100644
index 0000000000..edb8136c04
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/same-origin/script-tag.http.html
@@ -0,0 +1,122 @@
+<!DOCTYPE html>
+<!-- DO 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": "omitted",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/top.http-rp/same-origin/script-tag.http.html.headers b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/same-origin/script-tag.http.html.headers
new file mode 100644
index 0000000000..be66cf9321
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/same-origin/script-tag.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: same-origin
diff --git a/testing/web-platform/tests/referrer-policy/gen/top.http-rp/same-origin/sharedworker-classic.http.html b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/same-origin/sharedworker-classic.http.html
new file mode 100644
index 0000000000..1bc6f04b8c
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/same-origin/sharedworker-classic.http.html
@@ -0,0 +1,42 @@
+<!DOCTYPE html>
+<!-- DO 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": [],
+ "source_scheme": "http",
+ "subresource": "sharedworker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for sharedworker-classic to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "sharedworker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for sharedworker-classic to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/top.http-rp/same-origin/sharedworker-classic.http.html.headers b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/same-origin/sharedworker-classic.http.html.headers
new file mode 100644
index 0000000000..be66cf9321
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/same-origin/sharedworker-classic.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: same-origin
diff --git a/testing/web-platform/tests/referrer-policy/gen/top.http-rp/same-origin/sharedworker-module.http.html b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/same-origin/sharedworker-module.http.html
new file mode 100644
index 0000000000..a24ee872ad
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/same-origin/sharedworker-module.http.html
@@ -0,0 +1,42 @@
+<!DOCTYPE html>
+<!-- DO 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": [],
+ "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": [],
+ "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/top.http-rp/same-origin/sharedworker-module.http.html.headers b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/same-origin/sharedworker-module.http.html.headers
new file mode 100644
index 0000000000..be66cf9321
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/same-origin/sharedworker-module.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: same-origin
diff --git a/testing/web-platform/tests/referrer-policy/gen/top.http-rp/same-origin/worker-classic.http.html b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/same-origin/worker-classic.http.html
new file mode 100644
index 0000000000..7e6e8f3c5f
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/same-origin/worker-classic.http.html
@@ -0,0 +1,42 @@
+<!DOCTYPE html>
+<!-- DO 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": [],
+ "source_scheme": "http",
+ "subresource": "worker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-classic to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "worker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-classic to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/top.http-rp/same-origin/worker-classic.http.html.headers b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/same-origin/worker-classic.http.html.headers
new file mode 100644
index 0000000000..be66cf9321
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/same-origin/worker-classic.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: same-origin
diff --git a/testing/web-platform/tests/referrer-policy/gen/top.http-rp/same-origin/worker-module.http.html b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/same-origin/worker-module.http.html
new file mode 100644
index 0000000000..ae453ee0f0
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/same-origin/worker-module.http.html
@@ -0,0 +1,42 @@
+<!DOCTYPE html>
+<!-- DO 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": [],
+ "source_scheme": "http",
+ "subresource": "worker-module",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-module to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "worker-module",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-module to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/top.http-rp/same-origin/worker-module.http.html.headers b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/same-origin/worker-module.http.html.headers
new file mode 100644
index 0000000000..be66cf9321
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/same-origin/worker-module.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: same-origin
diff --git a/testing/web-platform/tests/referrer-policy/gen/top.http-rp/same-origin/xhr.http.html b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/same-origin/xhr.http.html
new file mode 100644
index 0000000000..b28d7e378b
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/same-origin/xhr.http.html
@@ -0,0 +1,122 @@
+<!DOCTYPE html>
+<!-- DO 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": "omitted",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/top.http-rp/same-origin/xhr.http.html.headers b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/same-origin/xhr.http.html.headers
new file mode 100644
index 0000000000..be66cf9321
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/same-origin/xhr.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: same-origin
diff --git a/testing/web-platform/tests/referrer-policy/gen/top.http-rp/strict-origin-when-cross-origin/a-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/strict-origin-when-cross-origin/a-tag.http.html
new file mode 100644
index 0000000000..72e159c72e
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/strict-origin-when-cross-origin/a-tag.http.html
@@ -0,0 +1,62 @@
+<!DOCTYPE html>
+<!-- DO 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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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/top.http-rp/strict-origin-when-cross-origin/a-tag.http.html.headers b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/strict-origin-when-cross-origin/a-tag.http.html.headers
new file mode 100644
index 0000000000..4cff1d12f8
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/strict-origin-when-cross-origin/a-tag.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: strict-origin-when-cross-origin
diff --git a/testing/web-platform/tests/referrer-policy/gen/top.http-rp/strict-origin-when-cross-origin/fetch.http.html b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/strict-origin-when-cross-origin/fetch.http.html
new file mode 100644
index 0000000000..1dfb592eeb
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/strict-origin-when-cross-origin/fetch.http.html
@@ -0,0 +1,142 @@
+<!DOCTYPE html>
+<!-- DO 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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/top.http-rp/strict-origin-when-cross-origin/fetch.http.html.headers b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/strict-origin-when-cross-origin/fetch.http.html.headers
new file mode 100644
index 0000000000..4cff1d12f8
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/strict-origin-when-cross-origin/fetch.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: strict-origin-when-cross-origin
diff --git a/testing/web-platform/tests/referrer-policy/gen/top.http-rp/strict-origin-when-cross-origin/iframe-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/strict-origin-when-cross-origin/iframe-tag.http.html
new file mode 100644
index 0000000000..557d6a5323
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/strict-origin-when-cross-origin/iframe-tag.http.html
@@ -0,0 +1,142 @@
+<!DOCTYPE html>
+<!-- DO 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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/top.http-rp/strict-origin-when-cross-origin/iframe-tag.http.html.headers b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/strict-origin-when-cross-origin/iframe-tag.http.html.headers
new file mode 100644
index 0000000000..4cff1d12f8
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/strict-origin-when-cross-origin/iframe-tag.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: strict-origin-when-cross-origin
diff --git a/testing/web-platform/tests/referrer-policy/gen/top.http-rp/strict-origin-when-cross-origin/img-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/strict-origin-when-cross-origin/img-tag.http.html
new file mode 100644
index 0000000000..3987df1518
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/strict-origin-when-cross-origin/img-tag.http.html
@@ -0,0 +1,142 @@
+<!DOCTYPE html>
+<!-- DO 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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/top.http-rp/strict-origin-when-cross-origin/img-tag.http.html.headers b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/strict-origin-when-cross-origin/img-tag.http.html.headers
new file mode 100644
index 0000000000..4cff1d12f8
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/strict-origin-when-cross-origin/img-tag.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: strict-origin-when-cross-origin
diff --git a/testing/web-platform/tests/referrer-policy/gen/top.http-rp/strict-origin-when-cross-origin/script-tag-dynamic-import.http.html b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/strict-origin-when-cross-origin/script-tag-dynamic-import.http.html
new file mode 100644
index 0000000000..6444480eb9
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/strict-origin-when-cross-origin/script-tag-dynamic-import.http.html
@@ -0,0 +1,142 @@
+<!DOCTYPE html>
+<!-- DO 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": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for script-tag-dynamic-import to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for script-tag-dynamic-import to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for script-tag-dynamic-import to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for script-tag-dynamic-import to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for script-tag-dynamic-import to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for script-tag-dynamic-import to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for script-tag-dynamic-import to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for script-tag-dynamic-import to same-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for script-tag-dynamic-import to same-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for script-tag-dynamic-import to same-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag-dynamic-import to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag-dynamic-import to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/top.http-rp/strict-origin-when-cross-origin/script-tag-dynamic-import.http.html.headers b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/strict-origin-when-cross-origin/script-tag-dynamic-import.http.html.headers
new file mode 100644
index 0000000000..4cff1d12f8
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/strict-origin-when-cross-origin/script-tag-dynamic-import.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: strict-origin-when-cross-origin
diff --git a/testing/web-platform/tests/referrer-policy/gen/top.http-rp/strict-origin-when-cross-origin/script-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/strict-origin-when-cross-origin/script-tag.http.html
new file mode 100644
index 0000000000..788c8d04f2
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/strict-origin-when-cross-origin/script-tag.http.html
@@ -0,0 +1,142 @@
+<!DOCTYPE html>
+<!-- DO 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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/top.http-rp/strict-origin-when-cross-origin/script-tag.http.html.headers b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/strict-origin-when-cross-origin/script-tag.http.html.headers
new file mode 100644
index 0000000000..4cff1d12f8
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/strict-origin-when-cross-origin/script-tag.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: strict-origin-when-cross-origin
diff --git a/testing/web-platform/tests/referrer-policy/gen/top.http-rp/strict-origin-when-cross-origin/sharedworker-classic.http.html b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/strict-origin-when-cross-origin/sharedworker-classic.http.html
new file mode 100644
index 0000000000..1bc6f04b8c
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/strict-origin-when-cross-origin/sharedworker-classic.http.html
@@ -0,0 +1,42 @@
+<!DOCTYPE html>
+<!-- DO 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": [],
+ "source_scheme": "http",
+ "subresource": "sharedworker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for sharedworker-classic to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "sharedworker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for sharedworker-classic to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/top.http-rp/strict-origin-when-cross-origin/sharedworker-classic.http.html.headers b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/strict-origin-when-cross-origin/sharedworker-classic.http.html.headers
new file mode 100644
index 0000000000..4cff1d12f8
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/strict-origin-when-cross-origin/sharedworker-classic.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: strict-origin-when-cross-origin
diff --git a/testing/web-platform/tests/referrer-policy/gen/top.http-rp/strict-origin-when-cross-origin/sharedworker-module.http.html b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/strict-origin-when-cross-origin/sharedworker-module.http.html
new file mode 100644
index 0000000000..a24ee872ad
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/strict-origin-when-cross-origin/sharedworker-module.http.html
@@ -0,0 +1,42 @@
+<!DOCTYPE html>
+<!-- DO 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": [],
+ "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": [],
+ "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/top.http-rp/strict-origin-when-cross-origin/sharedworker-module.http.html.headers b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/strict-origin-when-cross-origin/sharedworker-module.http.html.headers
new file mode 100644
index 0000000000..4cff1d12f8
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/strict-origin-when-cross-origin/sharedworker-module.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: strict-origin-when-cross-origin
diff --git a/testing/web-platform/tests/referrer-policy/gen/top.http-rp/strict-origin-when-cross-origin/worker-classic.http.html b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/strict-origin-when-cross-origin/worker-classic.http.html
new file mode 100644
index 0000000000..7e6e8f3c5f
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/strict-origin-when-cross-origin/worker-classic.http.html
@@ -0,0 +1,42 @@
+<!DOCTYPE html>
+<!-- DO 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": [],
+ "source_scheme": "http",
+ "subresource": "worker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-classic to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "worker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-classic to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/top.http-rp/strict-origin-when-cross-origin/worker-classic.http.html.headers b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/strict-origin-when-cross-origin/worker-classic.http.html.headers
new file mode 100644
index 0000000000..4cff1d12f8
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/strict-origin-when-cross-origin/worker-classic.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: strict-origin-when-cross-origin
diff --git a/testing/web-platform/tests/referrer-policy/gen/top.http-rp/strict-origin-when-cross-origin/worker-module.http.html b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/strict-origin-when-cross-origin/worker-module.http.html
new file mode 100644
index 0000000000..ae453ee0f0
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/strict-origin-when-cross-origin/worker-module.http.html
@@ -0,0 +1,42 @@
+<!DOCTYPE html>
+<!-- DO 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": [],
+ "source_scheme": "http",
+ "subresource": "worker-module",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-module to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "worker-module",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-module to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/top.http-rp/strict-origin-when-cross-origin/worker-module.http.html.headers b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/strict-origin-when-cross-origin/worker-module.http.html.headers
new file mode 100644
index 0000000000..4cff1d12f8
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/strict-origin-when-cross-origin/worker-module.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: strict-origin-when-cross-origin
diff --git a/testing/web-platform/tests/referrer-policy/gen/top.http-rp/strict-origin-when-cross-origin/xhr.http.html b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/strict-origin-when-cross-origin/xhr.http.html
new file mode 100644
index 0000000000..866577c336
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/strict-origin-when-cross-origin/xhr.http.html
@@ -0,0 +1,142 @@
+<!DOCTYPE html>
+<!-- DO 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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/top.http-rp/strict-origin-when-cross-origin/xhr.http.html.headers b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/strict-origin-when-cross-origin/xhr.http.html.headers
new file mode 100644
index 0000000000..4cff1d12f8
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/strict-origin-when-cross-origin/xhr.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: strict-origin-when-cross-origin
diff --git a/testing/web-platform/tests/referrer-policy/gen/top.http-rp/strict-origin/a-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/strict-origin/a-tag.http.html
new file mode 100644
index 0000000000..496521351a
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/strict-origin/a-tag.http.html
@@ -0,0 +1,62 @@
+<!DOCTYPE html>
+<!-- DO 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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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/top.http-rp/strict-origin/a-tag.http.html.headers b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/strict-origin/a-tag.http.html.headers
new file mode 100644
index 0000000000..1c32fba5a1
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/strict-origin/a-tag.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: strict-origin
diff --git a/testing/web-platform/tests/referrer-policy/gen/top.http-rp/strict-origin/fetch.http.html b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/strict-origin/fetch.http.html
new file mode 100644
index 0000000000..b4d0161739
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/strict-origin/fetch.http.html
@@ -0,0 +1,142 @@
+<!DOCTYPE html>
+<!-- DO 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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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/top.http-rp/strict-origin/fetch.http.html.headers b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/strict-origin/fetch.http.html.headers
new file mode 100644
index 0000000000..1c32fba5a1
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/strict-origin/fetch.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: strict-origin
diff --git a/testing/web-platform/tests/referrer-policy/gen/top.http-rp/strict-origin/iframe-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/strict-origin/iframe-tag.http.html
new file mode 100644
index 0000000000..e2eb629831
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/strict-origin/iframe-tag.http.html
@@ -0,0 +1,142 @@
+<!DOCTYPE html>
+<!-- DO 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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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/top.http-rp/strict-origin/iframe-tag.http.html.headers b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/strict-origin/iframe-tag.http.html.headers
new file mode 100644
index 0000000000..1c32fba5a1
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/strict-origin/iframe-tag.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: strict-origin
diff --git a/testing/web-platform/tests/referrer-policy/gen/top.http-rp/strict-origin/img-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/strict-origin/img-tag.http.html
new file mode 100644
index 0000000000..f0c99d563a
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/strict-origin/img-tag.http.html
@@ -0,0 +1,142 @@
+<!DOCTYPE html>
+<!-- DO 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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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/top.http-rp/strict-origin/img-tag.http.html.headers b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/strict-origin/img-tag.http.html.headers
new file mode 100644
index 0000000000..1c32fba5a1
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/strict-origin/img-tag.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: strict-origin
diff --git a/testing/web-platform/tests/referrer-policy/gen/top.http-rp/strict-origin/script-tag-dynamic-import.http.html b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/strict-origin/script-tag-dynamic-import.http.html
new file mode 100644
index 0000000000..4e754dcebc
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/strict-origin/script-tag-dynamic-import.http.html
@@ -0,0 +1,142 @@
+<!DOCTYPE html>
+<!-- DO 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": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for script-tag-dynamic-import to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for script-tag-dynamic-import to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for script-tag-dynamic-import to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for script-tag-dynamic-import to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for script-tag-dynamic-import to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for script-tag-dynamic-import to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for script-tag-dynamic-import to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for script-tag-dynamic-import to same-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for script-tag-dynamic-import to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for script-tag-dynamic-import to same-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for script-tag-dynamic-import to same-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for script-tag-dynamic-import to same-https origin and swap-origin redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/top.http-rp/strict-origin/script-tag-dynamic-import.http.html.headers b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/strict-origin/script-tag-dynamic-import.http.html.headers
new file mode 100644
index 0000000000..1c32fba5a1
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/strict-origin/script-tag-dynamic-import.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: strict-origin
diff --git a/testing/web-platform/tests/referrer-policy/gen/top.http-rp/strict-origin/script-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/strict-origin/script-tag.http.html
new file mode 100644
index 0000000000..f41884b684
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/strict-origin/script-tag.http.html
@@ -0,0 +1,142 @@
+<!DOCTYPE html>
+<!-- DO 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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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/top.http-rp/strict-origin/script-tag.http.html.headers b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/strict-origin/script-tag.http.html.headers
new file mode 100644
index 0000000000..1c32fba5a1
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/strict-origin/script-tag.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: strict-origin
diff --git a/testing/web-platform/tests/referrer-policy/gen/top.http-rp/strict-origin/sharedworker-classic.http.html b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/strict-origin/sharedworker-classic.http.html
new file mode 100644
index 0000000000..24eeee8188
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/strict-origin/sharedworker-classic.http.html
@@ -0,0 +1,42 @@
+<!DOCTYPE html>
+<!-- DO 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": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "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": [],
+ "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/top.http-rp/strict-origin/sharedworker-classic.http.html.headers b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/strict-origin/sharedworker-classic.http.html.headers
new file mode 100644
index 0000000000..1c32fba5a1
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/strict-origin/sharedworker-classic.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: strict-origin
diff --git a/testing/web-platform/tests/referrer-policy/gen/top.http-rp/strict-origin/sharedworker-module.http.html b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/strict-origin/sharedworker-module.http.html
new file mode 100644
index 0000000000..ff1170a108
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/strict-origin/sharedworker-module.http.html
@@ -0,0 +1,42 @@
+<!DOCTYPE html>
+<!-- DO 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": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "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": [],
+ "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/top.http-rp/strict-origin/sharedworker-module.http.html.headers b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/strict-origin/sharedworker-module.http.html.headers
new file mode 100644
index 0000000000..1c32fba5a1
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/strict-origin/sharedworker-module.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: strict-origin
diff --git a/testing/web-platform/tests/referrer-policy/gen/top.http-rp/strict-origin/worker-classic.http.html b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/strict-origin/worker-classic.http.html
new file mode 100644
index 0000000000..4e9a4c4911
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/strict-origin/worker-classic.http.html
@@ -0,0 +1,42 @@
+<!DOCTYPE html>
+<!-- DO 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": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "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": [],
+ "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/top.http-rp/strict-origin/worker-classic.http.html.headers b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/strict-origin/worker-classic.http.html.headers
new file mode 100644
index 0000000000..1c32fba5a1
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/strict-origin/worker-classic.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: strict-origin
diff --git a/testing/web-platform/tests/referrer-policy/gen/top.http-rp/strict-origin/worker-module.http.html b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/strict-origin/worker-module.http.html
new file mode 100644
index 0000000000..57ce11f6f9
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/strict-origin/worker-module.http.html
@@ -0,0 +1,42 @@
+<!DOCTYPE html>
+<!-- DO 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": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "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": [],
+ "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/top.http-rp/strict-origin/worker-module.http.html.headers b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/strict-origin/worker-module.http.html.headers
new file mode 100644
index 0000000000..1c32fba5a1
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/strict-origin/worker-module.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: strict-origin
diff --git a/testing/web-platform/tests/referrer-policy/gen/top.http-rp/strict-origin/xhr.http.html b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/strict-origin/xhr.http.html
new file mode 100644
index 0000000000..e1d6b7a798
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/strict-origin/xhr.http.html
@@ -0,0 +1,142 @@
+<!DOCTYPE html>
+<!-- DO 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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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/top.http-rp/strict-origin/xhr.http.html.headers b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/strict-origin/xhr.http.html.headers
new file mode 100644
index 0000000000..1c32fba5a1
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/strict-origin/xhr.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: strict-origin
diff --git a/testing/web-platform/tests/referrer-policy/gen/top.http-rp/unsafe-url/a-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/unsafe-url/a-tag.http.html
new file mode 100644
index 0000000000..67702eb925
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/unsafe-url/a-tag.http.html
@@ -0,0 +1,62 @@
+<!DOCTYPE html>
+<!-- DO 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": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "a-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for a-tag to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "a-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for a-tag to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "a-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for a-tag to same-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "a-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for a-tag to same-https origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/top.http-rp/unsafe-url/a-tag.http.html.headers b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/unsafe-url/a-tag.http.html.headers
new file mode 100644
index 0000000000..c1d3fd1a0b
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/unsafe-url/a-tag.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: unsafe-url
diff --git a/testing/web-platform/tests/referrer-policy/gen/top.http-rp/unsafe-url/fetch.http.html b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/unsafe-url/fetch.http.html
new file mode 100644
index 0000000000..5c2ed3836d
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/unsafe-url/fetch.http.html
@@ -0,0 +1,142 @@
+<!DOCTYPE html>
+<!-- DO 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": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-https origin and swap-origin redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/top.http-rp/unsafe-url/fetch.http.html.headers b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/unsafe-url/fetch.http.html.headers
new file mode 100644
index 0000000000..c1d3fd1a0b
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/unsafe-url/fetch.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: unsafe-url
diff --git a/testing/web-platform/tests/referrer-policy/gen/top.http-rp/unsafe-url/iframe-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/unsafe-url/iframe-tag.http.html
new file mode 100644
index 0000000000..26d595fcc6
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/unsafe-url/iframe-tag.http.html
@@ -0,0 +1,142 @@
+<!DOCTYPE html>
+<!-- DO 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": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-https origin and swap-origin redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/top.http-rp/unsafe-url/iframe-tag.http.html.headers b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/unsafe-url/iframe-tag.http.html.headers
new file mode 100644
index 0000000000..c1d3fd1a0b
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/unsafe-url/iframe-tag.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: unsafe-url
diff --git a/testing/web-platform/tests/referrer-policy/gen/top.http-rp/unsafe-url/img-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/unsafe-url/img-tag.http.html
new file mode 100644
index 0000000000..0827ebde9c
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/unsafe-url/img-tag.http.html
@@ -0,0 +1,142 @@
+<!DOCTYPE html>
+<!-- DO 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": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-https origin and swap-origin redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/top.http-rp/unsafe-url/img-tag.http.html.headers b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/unsafe-url/img-tag.http.html.headers
new file mode 100644
index 0000000000..c1d3fd1a0b
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/unsafe-url/img-tag.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: unsafe-url
diff --git a/testing/web-platform/tests/referrer-policy/gen/top.http-rp/unsafe-url/script-tag-dynamic-import.http.html b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/unsafe-url/script-tag-dynamic-import.http.html
new file mode 100644
index 0000000000..4009fe6a61
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/unsafe-url/script-tag-dynamic-import.http.html
@@ -0,0 +1,142 @@
+<!DOCTYPE html>
+<!-- DO 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": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag-dynamic-import to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag-dynamic-import to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag-dynamic-import to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag-dynamic-import to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag-dynamic-import to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag-dynamic-import to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag-dynamic-import to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag-dynamic-import to same-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag-dynamic-import to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag-dynamic-import to same-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag-dynamic-import to same-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag-dynamic-import to same-https origin and swap-origin redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/top.http-rp/unsafe-url/script-tag-dynamic-import.http.html.headers b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/unsafe-url/script-tag-dynamic-import.http.html.headers
new file mode 100644
index 0000000000..c1d3fd1a0b
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/unsafe-url/script-tag-dynamic-import.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: unsafe-url
diff --git a/testing/web-platform/tests/referrer-policy/gen/top.http-rp/unsafe-url/script-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/unsafe-url/script-tag.http.html
new file mode 100644
index 0000000000..c5cad6a043
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/unsafe-url/script-tag.http.html
@@ -0,0 +1,142 @@
+<!DOCTYPE html>
+<!-- DO 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": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-https origin and swap-origin redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/top.http-rp/unsafe-url/script-tag.http.html.headers b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/unsafe-url/script-tag.http.html.headers
new file mode 100644
index 0000000000..c1d3fd1a0b
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/unsafe-url/script-tag.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: unsafe-url
diff --git a/testing/web-platform/tests/referrer-policy/gen/top.http-rp/unsafe-url/sharedworker-classic.http.html b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/unsafe-url/sharedworker-classic.http.html
new file mode 100644
index 0000000000..1bc6f04b8c
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/unsafe-url/sharedworker-classic.http.html
@@ -0,0 +1,42 @@
+<!DOCTYPE html>
+<!-- DO 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": [],
+ "source_scheme": "http",
+ "subresource": "sharedworker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for sharedworker-classic to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "sharedworker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for sharedworker-classic to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/top.http-rp/unsafe-url/sharedworker-classic.http.html.headers b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/unsafe-url/sharedworker-classic.http.html.headers
new file mode 100644
index 0000000000..c1d3fd1a0b
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/unsafe-url/sharedworker-classic.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: unsafe-url
diff --git a/testing/web-platform/tests/referrer-policy/gen/top.http-rp/unsafe-url/sharedworker-module.http.html b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/unsafe-url/sharedworker-module.http.html
new file mode 100644
index 0000000000..a24ee872ad
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/unsafe-url/sharedworker-module.http.html
@@ -0,0 +1,42 @@
+<!DOCTYPE html>
+<!-- DO 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": [],
+ "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": [],
+ "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/top.http-rp/unsafe-url/sharedworker-module.http.html.headers b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/unsafe-url/sharedworker-module.http.html.headers
new file mode 100644
index 0000000000..c1d3fd1a0b
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/unsafe-url/sharedworker-module.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: unsafe-url
diff --git a/testing/web-platform/tests/referrer-policy/gen/top.http-rp/unsafe-url/worker-classic.http.html b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/unsafe-url/worker-classic.http.html
new file mode 100644
index 0000000000..7e6e8f3c5f
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/unsafe-url/worker-classic.http.html
@@ -0,0 +1,42 @@
+<!DOCTYPE html>
+<!-- DO 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": [],
+ "source_scheme": "http",
+ "subresource": "worker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-classic to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "worker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-classic to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/top.http-rp/unsafe-url/worker-classic.http.html.headers b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/unsafe-url/worker-classic.http.html.headers
new file mode 100644
index 0000000000..c1d3fd1a0b
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/unsafe-url/worker-classic.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: unsafe-url
diff --git a/testing/web-platform/tests/referrer-policy/gen/top.http-rp/unsafe-url/worker-module.http.html b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/unsafe-url/worker-module.http.html
new file mode 100644
index 0000000000..ae453ee0f0
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/unsafe-url/worker-module.http.html
@@ -0,0 +1,42 @@
+<!DOCTYPE html>
+<!-- DO 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": [],
+ "source_scheme": "http",
+ "subresource": "worker-module",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-module to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "worker-module",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-module to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/top.http-rp/unsafe-url/worker-module.http.html.headers b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/unsafe-url/worker-module.http.html.headers
new file mode 100644
index 0000000000..c1d3fd1a0b
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/unsafe-url/worker-module.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: unsafe-url
diff --git a/testing/web-platform/tests/referrer-policy/gen/top.http-rp/unsafe-url/xhr.http.html b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/unsafe-url/xhr.http.html
new file mode 100644
index 0000000000..b3380b89ba
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/unsafe-url/xhr.http.html
@@ -0,0 +1,142 @@
+<!DOCTYPE html>
+<!-- DO 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": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-https origin and swap-origin redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/top.http-rp/unsafe-url/xhr.http.html.headers b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/unsafe-url/xhr.http.html.headers
new file mode 100644
index 0000000000..c1d3fd1a0b
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/unsafe-url/xhr.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: unsafe-url
diff --git a/testing/web-platform/tests/referrer-policy/gen/top.http-rp/unset/a-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/unset/a-tag.http.html
new file mode 100644
index 0000000000..72e159c72e
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/unset/a-tag.http.html
@@ -0,0 +1,62 @@
+<!DOCTYPE html>
+<!-- DO 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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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/top.http-rp/unset/fetch.http.html b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/unset/fetch.http.html
new file mode 100644
index 0000000000..1dfb592eeb
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/unset/fetch.http.html
@@ -0,0 +1,142 @@
+<!DOCTYPE html>
+<!-- DO 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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/top.http-rp/unset/iframe-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/unset/iframe-tag.http.html
new file mode 100644
index 0000000000..557d6a5323
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/unset/iframe-tag.http.html
@@ -0,0 +1,142 @@
+<!DOCTYPE html>
+<!-- DO 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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/top.http-rp/unset/img-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/unset/img-tag.http.html
new file mode 100644
index 0000000000..3987df1518
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/unset/img-tag.http.html
@@ -0,0 +1,142 @@
+<!DOCTYPE html>
+<!-- DO 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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/top.http-rp/unset/script-tag-dynamic-import.http.html b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/unset/script-tag-dynamic-import.http.html
new file mode 100644
index 0000000000..6444480eb9
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/unset/script-tag-dynamic-import.http.html
@@ -0,0 +1,142 @@
+<!DOCTYPE html>
+<!-- DO 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": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for script-tag-dynamic-import to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for script-tag-dynamic-import to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for script-tag-dynamic-import to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for script-tag-dynamic-import to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for script-tag-dynamic-import to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for script-tag-dynamic-import to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for script-tag-dynamic-import to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for script-tag-dynamic-import to same-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for script-tag-dynamic-import to same-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for script-tag-dynamic-import to same-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag-dynamic-import to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag-dynamic-import to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/top.http-rp/unset/script-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/unset/script-tag.http.html
new file mode 100644
index 0000000000..788c8d04f2
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/unset/script-tag.http.html
@@ -0,0 +1,142 @@
+<!DOCTYPE html>
+<!-- DO 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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/top.http-rp/unset/sharedworker-classic.http.html b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/unset/sharedworker-classic.http.html
new file mode 100644
index 0000000000..1bc6f04b8c
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/unset/sharedworker-classic.http.html
@@ -0,0 +1,42 @@
+<!DOCTYPE html>
+<!-- DO 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": [],
+ "source_scheme": "http",
+ "subresource": "sharedworker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for sharedworker-classic to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "sharedworker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for sharedworker-classic to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/top.http-rp/unset/sharedworker-module.http.html b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/unset/sharedworker-module.http.html
new file mode 100644
index 0000000000..a24ee872ad
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/unset/sharedworker-module.http.html
@@ -0,0 +1,42 @@
+<!DOCTYPE html>
+<!-- DO 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": [],
+ "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": [],
+ "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/top.http-rp/unset/worker-classic.http.html b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/unset/worker-classic.http.html
new file mode 100644
index 0000000000..7e6e8f3c5f
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/unset/worker-classic.http.html
@@ -0,0 +1,42 @@
+<!DOCTYPE html>
+<!-- DO 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": [],
+ "source_scheme": "http",
+ "subresource": "worker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-classic to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "worker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-classic to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/top.http-rp/unset/worker-module.http.html b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/unset/worker-module.http.html
new file mode 100644
index 0000000000..ae453ee0f0
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/unset/worker-module.http.html
@@ -0,0 +1,42 @@
+<!DOCTYPE html>
+<!-- DO 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": [],
+ "source_scheme": "http",
+ "subresource": "worker-module",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-module to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "worker-module",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-module to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/top.http-rp/unset/xhr.http.html b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/unset/xhr.http.html
new file mode 100644
index 0000000000..866577c336
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.http-rp/unset/xhr.http.html
@@ -0,0 +1,142 @@
+<!DOCTYPE html>
+<!-- DO 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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/top.meta/always/a-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/top.meta/always/a-tag.http.html
new file mode 100644
index 0000000000..574b17a7cd
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.meta/always/a-tag.http.html
@@ -0,0 +1,63 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `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": [],
+ "source_scheme": "http",
+ "subresource": "a-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for a-tag to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "a-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for a-tag to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "a-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for a-tag to same-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "a-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for a-tag to same-https origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/top.meta/always/fetch.http.html b/testing/web-platform/tests/referrer-policy/gen/top.meta/always/fetch.http.html
new file mode 100644
index 0000000000..7554f25fc1
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.meta/always/fetch.http.html
@@ -0,0 +1,143 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `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": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-https origin and swap-origin redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/top.meta/always/iframe-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/top.meta/always/iframe-tag.http.html
new file mode 100644
index 0000000000..0461b56427
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.meta/always/iframe-tag.http.html
@@ -0,0 +1,143 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `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": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-https origin and swap-origin redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/top.meta/always/img-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/top.meta/always/img-tag.http.html
new file mode 100644
index 0000000000..e211a9cc87
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.meta/always/img-tag.http.html
@@ -0,0 +1,143 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `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": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-https origin and swap-origin redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/top.meta/always/script-tag-dynamic-import.http.html b/testing/web-platform/tests/referrer-policy/gen/top.meta/always/script-tag-dynamic-import.http.html
new file mode 100644
index 0000000000..fb77c5b779
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.meta/always/script-tag-dynamic-import.http.html
@@ -0,0 +1,143 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `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": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag-dynamic-import to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag-dynamic-import to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag-dynamic-import to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag-dynamic-import to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag-dynamic-import to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag-dynamic-import to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag-dynamic-import to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag-dynamic-import to same-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag-dynamic-import to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag-dynamic-import to same-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag-dynamic-import to same-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag-dynamic-import to same-https origin and swap-origin redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/top.meta/always/script-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/top.meta/always/script-tag.http.html
new file mode 100644
index 0000000000..d9de64e1d7
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.meta/always/script-tag.http.html
@@ -0,0 +1,143 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `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": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-https origin and swap-origin redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/top.meta/always/sharedworker-classic.http.html b/testing/web-platform/tests/referrer-policy/gen/top.meta/always/sharedworker-classic.http.html
new file mode 100644
index 0000000000..45c5bc5456
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.meta/always/sharedworker-classic.http.html
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `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": [],
+ "source_scheme": "http",
+ "subresource": "sharedworker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for sharedworker-classic to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "sharedworker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for sharedworker-classic to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/top.meta/always/sharedworker-module.http.html b/testing/web-platform/tests/referrer-policy/gen/top.meta/always/sharedworker-module.http.html
new file mode 100644
index 0000000000..22950273af
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.meta/always/sharedworker-module.http.html
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `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": [],
+ "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": [],
+ "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/top.meta/always/worker-classic.http.html b/testing/web-platform/tests/referrer-policy/gen/top.meta/always/worker-classic.http.html
new file mode 100644
index 0000000000..ac59c72ddb
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.meta/always/worker-classic.http.html
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `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": [],
+ "source_scheme": "http",
+ "subresource": "worker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-classic to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "worker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-classic to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/top.meta/always/worker-module.http.html b/testing/web-platform/tests/referrer-policy/gen/top.meta/always/worker-module.http.html
new file mode 100644
index 0000000000..1a7d3aa9f9
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.meta/always/worker-module.http.html
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `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": [],
+ "source_scheme": "http",
+ "subresource": "worker-module",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-module to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "worker-module",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-module to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/top.meta/always/xhr.http.html b/testing/web-platform/tests/referrer-policy/gen/top.meta/always/xhr.http.html
new file mode 100644
index 0000000000..db12bea102
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.meta/always/xhr.http.html
@@ -0,0 +1,143 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `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": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-https origin and swap-origin redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/top.meta/default/a-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/top.meta/default/a-tag.http.html
new file mode 100644
index 0000000000..21b191652b
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.meta/default/a-tag.http.html
@@ -0,0 +1,63 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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/top.meta/default/fetch.http.html b/testing/web-platform/tests/referrer-policy/gen/top.meta/default/fetch.http.html
new file mode 100644
index 0000000000..d772f9fb8b
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.meta/default/fetch.http.html
@@ -0,0 +1,143 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/top.meta/default/iframe-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/top.meta/default/iframe-tag.http.html
new file mode 100644
index 0000000000..b71966f54c
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.meta/default/iframe-tag.http.html
@@ -0,0 +1,143 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/top.meta/default/img-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/top.meta/default/img-tag.http.html
new file mode 100644
index 0000000000..937aaf515c
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.meta/default/img-tag.http.html
@@ -0,0 +1,143 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/top.meta/default/script-tag-dynamic-import.http.html b/testing/web-platform/tests/referrer-policy/gen/top.meta/default/script-tag-dynamic-import.http.html
new file mode 100644
index 0000000000..b2372322d1
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.meta/default/script-tag-dynamic-import.http.html
@@ -0,0 +1,143 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `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": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for script-tag-dynamic-import to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for script-tag-dynamic-import to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for script-tag-dynamic-import to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for script-tag-dynamic-import to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for script-tag-dynamic-import to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for script-tag-dynamic-import to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for script-tag-dynamic-import to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for script-tag-dynamic-import to same-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for script-tag-dynamic-import to same-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for script-tag-dynamic-import to same-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag-dynamic-import to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag-dynamic-import to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/top.meta/default/script-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/top.meta/default/script-tag.http.html
new file mode 100644
index 0000000000..2795b8a9ab
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.meta/default/script-tag.http.html
@@ -0,0 +1,143 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/top.meta/default/sharedworker-classic.http.html b/testing/web-platform/tests/referrer-policy/gen/top.meta/default/sharedworker-classic.http.html
new file mode 100644
index 0000000000..a5dec50421
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.meta/default/sharedworker-classic.http.html
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `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": [],
+ "source_scheme": "http",
+ "subresource": "sharedworker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for sharedworker-classic to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "sharedworker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for sharedworker-classic to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/top.meta/default/sharedworker-module.http.html b/testing/web-platform/tests/referrer-policy/gen/top.meta/default/sharedworker-module.http.html
new file mode 100644
index 0000000000..8dcac3557f
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.meta/default/sharedworker-module.http.html
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `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": [],
+ "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": [],
+ "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/top.meta/default/worker-classic.http.html b/testing/web-platform/tests/referrer-policy/gen/top.meta/default/worker-classic.http.html
new file mode 100644
index 0000000000..10752b889f
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.meta/default/worker-classic.http.html
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `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": [],
+ "source_scheme": "http",
+ "subresource": "worker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-classic to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "worker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-classic to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/top.meta/default/worker-module.http.html b/testing/web-platform/tests/referrer-policy/gen/top.meta/default/worker-module.http.html
new file mode 100644
index 0000000000..b908f84497
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.meta/default/worker-module.http.html
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `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": [],
+ "source_scheme": "http",
+ "subresource": "worker-module",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-module to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "worker-module",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-module to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/top.meta/default/xhr.http.html b/testing/web-platform/tests/referrer-policy/gen/top.meta/default/xhr.http.html
new file mode 100644
index 0000000000..0dd95ca584
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.meta/default/xhr.http.html
@@ -0,0 +1,143 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/top.meta/never/a-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/top.meta/never/a-tag.http.html
new file mode 100644
index 0000000000..f15738fa3e
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.meta/never/a-tag.http.html
@@ -0,0 +1,63 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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/top.meta/never/fetch.http.html b/testing/web-platform/tests/referrer-policy/gen/top.meta/never/fetch.http.html
new file mode 100644
index 0000000000..fc15d5f7f3
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.meta/never/fetch.http.html
@@ -0,0 +1,143 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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/top.meta/never/iframe-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/top.meta/never/iframe-tag.http.html
new file mode 100644
index 0000000000..2932078a7b
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.meta/never/iframe-tag.http.html
@@ -0,0 +1,143 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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/top.meta/never/img-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/top.meta/never/img-tag.http.html
new file mode 100644
index 0000000000..6a69539224
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.meta/never/img-tag.http.html
@@ -0,0 +1,143 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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/top.meta/never/script-tag-dynamic-import.http.html b/testing/web-platform/tests/referrer-policy/gen/top.meta/never/script-tag-dynamic-import.http.html
new file mode 100644
index 0000000000..1b33d88ee7
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.meta/never/script-tag-dynamic-import.http.html
@@ -0,0 +1,143 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `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": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for script-tag-dynamic-import to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for script-tag-dynamic-import to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for script-tag-dynamic-import to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for script-tag-dynamic-import to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for script-tag-dynamic-import to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for script-tag-dynamic-import to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for script-tag-dynamic-import to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for script-tag-dynamic-import to same-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for script-tag-dynamic-import to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "same-https",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for script-tag-dynamic-import to same-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for script-tag-dynamic-import to same-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for script-tag-dynamic-import to same-https origin and swap-origin redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/top.meta/never/script-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/top.meta/never/script-tag.http.html
new file mode 100644
index 0000000000..b30b9c8e28
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.meta/never/script-tag.http.html
@@ -0,0 +1,143 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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/top.meta/never/sharedworker-classic.http.html b/testing/web-platform/tests/referrer-policy/gen/top.meta/never/sharedworker-classic.http.html
new file mode 100644
index 0000000000..38f9a5f051
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.meta/never/sharedworker-classic.http.html
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `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": [],
+ "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": [],
+ "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/top.meta/never/sharedworker-module.http.html b/testing/web-platform/tests/referrer-policy/gen/top.meta/never/sharedworker-module.http.html
new file mode 100644
index 0000000000..55e8cec205
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.meta/never/sharedworker-module.http.html
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `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": [],
+ "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": [],
+ "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/top.meta/never/worker-classic.http.html b/testing/web-platform/tests/referrer-policy/gen/top.meta/never/worker-classic.http.html
new file mode 100644
index 0000000000..bfcc6f6ab2
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.meta/never/worker-classic.http.html
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `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": [],
+ "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": [],
+ "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/top.meta/never/worker-module.http.html b/testing/web-platform/tests/referrer-policy/gen/top.meta/never/worker-module.http.html
new file mode 100644
index 0000000000..57330eaa02
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.meta/never/worker-module.http.html
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `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": [],
+ "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": [],
+ "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/top.meta/never/xhr.http.html b/testing/web-platform/tests/referrer-policy/gen/top.meta/never/xhr.http.html
new file mode 100644
index 0000000000..98ea3ff25a
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.meta/never/xhr.http.html
@@ -0,0 +1,143 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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/top.meta/no-referrer-when-downgrade/a-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/top.meta/no-referrer-when-downgrade/a-tag.http.html
new file mode 100644
index 0000000000..053832d237
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.meta/no-referrer-when-downgrade/a-tag.http.html
@@ -0,0 +1,63 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<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": [],
+ "source_scheme": "http",
+ "subresource": "a-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for a-tag to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "a-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for a-tag to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "a-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for a-tag to same-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "a-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for a-tag to same-https origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/top.meta/no-referrer-when-downgrade/fetch.http.html b/testing/web-platform/tests/referrer-policy/gen/top.meta/no-referrer-when-downgrade/fetch.http.html
new file mode 100644
index 0000000000..fbff2ccc7d
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.meta/no-referrer-when-downgrade/fetch.http.html
@@ -0,0 +1,143 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<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": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-https origin and swap-origin redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/top.meta/no-referrer-when-downgrade/iframe-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/top.meta/no-referrer-when-downgrade/iframe-tag.http.html
new file mode 100644
index 0000000000..94de097619
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.meta/no-referrer-when-downgrade/iframe-tag.http.html
@@ -0,0 +1,143 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<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": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-https origin and swap-origin redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/top.meta/no-referrer-when-downgrade/img-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/top.meta/no-referrer-when-downgrade/img-tag.http.html
new file mode 100644
index 0000000000..87ed2485e4
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.meta/no-referrer-when-downgrade/img-tag.http.html
@@ -0,0 +1,143 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<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": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-https origin and swap-origin redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/top.meta/no-referrer-when-downgrade/script-tag-dynamic-import.http.html b/testing/web-platform/tests/referrer-policy/gen/top.meta/no-referrer-when-downgrade/script-tag-dynamic-import.http.html
new file mode 100644
index 0000000000..5b00e927c4
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.meta/no-referrer-when-downgrade/script-tag-dynamic-import.http.html
@@ -0,0 +1,143 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `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": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag-dynamic-import to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag-dynamic-import to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag-dynamic-import to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag-dynamic-import to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag-dynamic-import to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag-dynamic-import to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag-dynamic-import to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag-dynamic-import to same-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag-dynamic-import to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag-dynamic-import to same-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag-dynamic-import to same-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag-dynamic-import to same-https origin and swap-origin redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/top.meta/no-referrer-when-downgrade/script-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/top.meta/no-referrer-when-downgrade/script-tag.http.html
new file mode 100644
index 0000000000..b32b60eee9
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.meta/no-referrer-when-downgrade/script-tag.http.html
@@ -0,0 +1,143 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<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": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-https origin and swap-origin redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/top.meta/no-referrer-when-downgrade/sharedworker-classic.http.html b/testing/web-platform/tests/referrer-policy/gen/top.meta/no-referrer-when-downgrade/sharedworker-classic.http.html
new file mode 100644
index 0000000000..c72386a4e6
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.meta/no-referrer-when-downgrade/sharedworker-classic.http.html
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<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": [],
+ "source_scheme": "http",
+ "subresource": "sharedworker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for sharedworker-classic to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "sharedworker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for sharedworker-classic to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/top.meta/no-referrer-when-downgrade/sharedworker-module.http.html b/testing/web-platform/tests/referrer-policy/gen/top.meta/no-referrer-when-downgrade/sharedworker-module.http.html
new file mode 100644
index 0000000000..1fb406cc87
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.meta/no-referrer-when-downgrade/sharedworker-module.http.html
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `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": [],
+ "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": [],
+ "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/top.meta/no-referrer-when-downgrade/worker-classic.http.html b/testing/web-platform/tests/referrer-policy/gen/top.meta/no-referrer-when-downgrade/worker-classic.http.html
new file mode 100644
index 0000000000..56acecdca8
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.meta/no-referrer-when-downgrade/worker-classic.http.html
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<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": [],
+ "source_scheme": "http",
+ "subresource": "worker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-classic to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "worker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-classic to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/top.meta/no-referrer-when-downgrade/worker-module.http.html b/testing/web-platform/tests/referrer-policy/gen/top.meta/no-referrer-when-downgrade/worker-module.http.html
new file mode 100644
index 0000000000..5ee0a331cc
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.meta/no-referrer-when-downgrade/worker-module.http.html
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<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": [],
+ "source_scheme": "http",
+ "subresource": "worker-module",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-module to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "worker-module",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-module to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/top.meta/no-referrer-when-downgrade/xhr.http.html b/testing/web-platform/tests/referrer-policy/gen/top.meta/no-referrer-when-downgrade/xhr.http.html
new file mode 100644
index 0000000000..ba439701ab
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.meta/no-referrer-when-downgrade/xhr.http.html
@@ -0,0 +1,143 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<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": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-https origin and swap-origin redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/top.meta/no-referrer/a-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/top.meta/no-referrer/a-tag.http.html
new file mode 100644
index 0000000000..3760f51c6d
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.meta/no-referrer/a-tag.http.html
@@ -0,0 +1,63 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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/top.meta/no-referrer/fetch.http.html b/testing/web-platform/tests/referrer-policy/gen/top.meta/no-referrer/fetch.http.html
new file mode 100644
index 0000000000..046e853074
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.meta/no-referrer/fetch.http.html
@@ -0,0 +1,143 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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/top.meta/no-referrer/iframe-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/top.meta/no-referrer/iframe-tag.http.html
new file mode 100644
index 0000000000..3954e67fff
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.meta/no-referrer/iframe-tag.http.html
@@ -0,0 +1,143 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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/top.meta/no-referrer/img-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/top.meta/no-referrer/img-tag.http.html
new file mode 100644
index 0000000000..e3720a2df7
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.meta/no-referrer/img-tag.http.html
@@ -0,0 +1,143 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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/top.meta/no-referrer/script-tag-dynamic-import.http.html b/testing/web-platform/tests/referrer-policy/gen/top.meta/no-referrer/script-tag-dynamic-import.http.html
new file mode 100644
index 0000000000..5eaba98c26
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.meta/no-referrer/script-tag-dynamic-import.http.html
@@ -0,0 +1,143 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `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": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for script-tag-dynamic-import to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for script-tag-dynamic-import to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for script-tag-dynamic-import to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for script-tag-dynamic-import to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for script-tag-dynamic-import to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for script-tag-dynamic-import to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for script-tag-dynamic-import to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for script-tag-dynamic-import to same-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for script-tag-dynamic-import to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "same-https",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for script-tag-dynamic-import to same-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for script-tag-dynamic-import to same-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for script-tag-dynamic-import to same-https origin and swap-origin redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/top.meta/no-referrer/script-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/top.meta/no-referrer/script-tag.http.html
new file mode 100644
index 0000000000..0bb90ddc53
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.meta/no-referrer/script-tag.http.html
@@ -0,0 +1,143 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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/top.meta/no-referrer/sharedworker-classic.http.html b/testing/web-platform/tests/referrer-policy/gen/top.meta/no-referrer/sharedworker-classic.http.html
new file mode 100644
index 0000000000..b0a58ec071
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.meta/no-referrer/sharedworker-classic.http.html
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `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": [],
+ "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": [],
+ "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/top.meta/no-referrer/sharedworker-module.http.html b/testing/web-platform/tests/referrer-policy/gen/top.meta/no-referrer/sharedworker-module.http.html
new file mode 100644
index 0000000000..0de18a801e
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.meta/no-referrer/sharedworker-module.http.html
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `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": [],
+ "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": [],
+ "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/top.meta/no-referrer/worker-classic.http.html b/testing/web-platform/tests/referrer-policy/gen/top.meta/no-referrer/worker-classic.http.html
new file mode 100644
index 0000000000..61ef7547b3
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.meta/no-referrer/worker-classic.http.html
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `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": [],
+ "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": [],
+ "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/top.meta/no-referrer/worker-module.http.html b/testing/web-platform/tests/referrer-policy/gen/top.meta/no-referrer/worker-module.http.html
new file mode 100644
index 0000000000..b90c47fb4a
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.meta/no-referrer/worker-module.http.html
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `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": [],
+ "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": [],
+ "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/top.meta/no-referrer/xhr.http.html b/testing/web-platform/tests/referrer-policy/gen/top.meta/no-referrer/xhr.http.html
new file mode 100644
index 0000000000..365ae53ee9
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.meta/no-referrer/xhr.http.html
@@ -0,0 +1,143 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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/top.meta/origin-when-cross-origin/a-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/top.meta/origin-when-cross-origin/a-tag.http.html
new file mode 100644
index 0000000000..c90fbac847
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.meta/origin-when-cross-origin/a-tag.http.html
@@ -0,0 +1,63 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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/top.meta/origin-when-cross-origin/fetch.http.html b/testing/web-platform/tests/referrer-policy/gen/top.meta/origin-when-cross-origin/fetch.http.html
new file mode 100644
index 0000000000..026d1127cf
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.meta/origin-when-cross-origin/fetch.http.html
@@ -0,0 +1,143 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/top.meta/origin-when-cross-origin/iframe-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/top.meta/origin-when-cross-origin/iframe-tag.http.html
new file mode 100644
index 0000000000..ac41652006
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.meta/origin-when-cross-origin/iframe-tag.http.html
@@ -0,0 +1,143 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/top.meta/origin-when-cross-origin/img-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/top.meta/origin-when-cross-origin/img-tag.http.html
new file mode 100644
index 0000000000..c359cedf9d
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.meta/origin-when-cross-origin/img-tag.http.html
@@ -0,0 +1,143 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/top.meta/origin-when-cross-origin/script-tag-dynamic-import.http.html b/testing/web-platform/tests/referrer-policy/gen/top.meta/origin-when-cross-origin/script-tag-dynamic-import.http.html
new file mode 100644
index 0000000000..8bb6d6eba2
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.meta/origin-when-cross-origin/script-tag-dynamic-import.http.html
@@ -0,0 +1,143 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `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": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for script-tag-dynamic-import to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for script-tag-dynamic-import to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for script-tag-dynamic-import to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for script-tag-dynamic-import to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for script-tag-dynamic-import to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for script-tag-dynamic-import to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for script-tag-dynamic-import to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for script-tag-dynamic-import to same-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for script-tag-dynamic-import to same-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for script-tag-dynamic-import to same-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag-dynamic-import to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag-dynamic-import to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/top.meta/origin-when-cross-origin/script-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/top.meta/origin-when-cross-origin/script-tag.http.html
new file mode 100644
index 0000000000..e85254c9c2
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.meta/origin-when-cross-origin/script-tag.http.html
@@ -0,0 +1,143 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/top.meta/origin-when-cross-origin/sharedworker-classic.http.html b/testing/web-platform/tests/referrer-policy/gen/top.meta/origin-when-cross-origin/sharedworker-classic.http.html
new file mode 100644
index 0000000000..164e5a5d6f
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.meta/origin-when-cross-origin/sharedworker-classic.http.html
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<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": [],
+ "source_scheme": "http",
+ "subresource": "sharedworker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for sharedworker-classic to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "sharedworker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for sharedworker-classic to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/top.meta/origin-when-cross-origin/sharedworker-module.http.html b/testing/web-platform/tests/referrer-policy/gen/top.meta/origin-when-cross-origin/sharedworker-module.http.html
new file mode 100644
index 0000000000..213e4a5763
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.meta/origin-when-cross-origin/sharedworker-module.http.html
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `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": [],
+ "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": [],
+ "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/top.meta/origin-when-cross-origin/worker-classic.http.html b/testing/web-platform/tests/referrer-policy/gen/top.meta/origin-when-cross-origin/worker-classic.http.html
new file mode 100644
index 0000000000..f63136bb9f
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.meta/origin-when-cross-origin/worker-classic.http.html
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<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": [],
+ "source_scheme": "http",
+ "subresource": "worker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-classic to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "worker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-classic to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/top.meta/origin-when-cross-origin/worker-module.http.html b/testing/web-platform/tests/referrer-policy/gen/top.meta/origin-when-cross-origin/worker-module.http.html
new file mode 100644
index 0000000000..0a14c4ba7b
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.meta/origin-when-cross-origin/worker-module.http.html
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<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": [],
+ "source_scheme": "http",
+ "subresource": "worker-module",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-module to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "worker-module",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-module to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/top.meta/origin-when-cross-origin/xhr.http.html b/testing/web-platform/tests/referrer-policy/gen/top.meta/origin-when-cross-origin/xhr.http.html
new file mode 100644
index 0000000000..38f8569c46
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.meta/origin-when-cross-origin/xhr.http.html
@@ -0,0 +1,143 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/top.meta/origin-when-crossorigin/a-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/top.meta/origin-when-crossorigin/a-tag.http.html
new file mode 100644
index 0000000000..270bc100e6
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.meta/origin-when-crossorigin/a-tag.http.html
@@ -0,0 +1,63 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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/top.meta/origin-when-crossorigin/fetch.http.html b/testing/web-platform/tests/referrer-policy/gen/top.meta/origin-when-crossorigin/fetch.http.html
new file mode 100644
index 0000000000..074d6ff454
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.meta/origin-when-crossorigin/fetch.http.html
@@ -0,0 +1,143 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/top.meta/origin-when-crossorigin/iframe-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/top.meta/origin-when-crossorigin/iframe-tag.http.html
new file mode 100644
index 0000000000..9b2be1b36d
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.meta/origin-when-crossorigin/iframe-tag.http.html
@@ -0,0 +1,143 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/top.meta/origin-when-crossorigin/img-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/top.meta/origin-when-crossorigin/img-tag.http.html
new file mode 100644
index 0000000000..23f029e018
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.meta/origin-when-crossorigin/img-tag.http.html
@@ -0,0 +1,143 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/top.meta/origin-when-crossorigin/script-tag-dynamic-import.http.html b/testing/web-platform/tests/referrer-policy/gen/top.meta/origin-when-crossorigin/script-tag-dynamic-import.http.html
new file mode 100644
index 0000000000..d752465085
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.meta/origin-when-crossorigin/script-tag-dynamic-import.http.html
@@ -0,0 +1,143 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `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": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for script-tag-dynamic-import to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for script-tag-dynamic-import to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for script-tag-dynamic-import to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for script-tag-dynamic-import to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for script-tag-dynamic-import to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for script-tag-dynamic-import to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for script-tag-dynamic-import to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for script-tag-dynamic-import to same-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for script-tag-dynamic-import to same-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for script-tag-dynamic-import to same-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag-dynamic-import to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag-dynamic-import to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/top.meta/origin-when-crossorigin/script-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/top.meta/origin-when-crossorigin/script-tag.http.html
new file mode 100644
index 0000000000..de679acf67
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.meta/origin-when-crossorigin/script-tag.http.html
@@ -0,0 +1,143 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/top.meta/origin-when-crossorigin/sharedworker-classic.http.html b/testing/web-platform/tests/referrer-policy/gen/top.meta/origin-when-crossorigin/sharedworker-classic.http.html
new file mode 100644
index 0000000000..ccc463ff5c
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.meta/origin-when-crossorigin/sharedworker-classic.http.html
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `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": [],
+ "source_scheme": "http",
+ "subresource": "sharedworker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for sharedworker-classic to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "sharedworker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for sharedworker-classic to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/top.meta/origin-when-crossorigin/sharedworker-module.http.html b/testing/web-platform/tests/referrer-policy/gen/top.meta/origin-when-crossorigin/sharedworker-module.http.html
new file mode 100644
index 0000000000..29fd0f2ef3
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.meta/origin-when-crossorigin/sharedworker-module.http.html
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `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": [],
+ "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": [],
+ "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/top.meta/origin-when-crossorigin/worker-classic.http.html b/testing/web-platform/tests/referrer-policy/gen/top.meta/origin-when-crossorigin/worker-classic.http.html
new file mode 100644
index 0000000000..dd99c2a608
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.meta/origin-when-crossorigin/worker-classic.http.html
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `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": [],
+ "source_scheme": "http",
+ "subresource": "worker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-classic to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "worker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-classic to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/top.meta/origin-when-crossorigin/worker-module.http.html b/testing/web-platform/tests/referrer-policy/gen/top.meta/origin-when-crossorigin/worker-module.http.html
new file mode 100644
index 0000000000..dd3800f59e
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.meta/origin-when-crossorigin/worker-module.http.html
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `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": [],
+ "source_scheme": "http",
+ "subresource": "worker-module",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-module to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "worker-module",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-module to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/top.meta/origin-when-crossorigin/xhr.http.html b/testing/web-platform/tests/referrer-policy/gen/top.meta/origin-when-crossorigin/xhr.http.html
new file mode 100644
index 0000000000..d639073154
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.meta/origin-when-crossorigin/xhr.http.html
@@ -0,0 +1,143 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/top.meta/origin/a-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/top.meta/origin/a-tag.http.html
new file mode 100644
index 0000000000..9eed6b4cc5
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.meta/origin/a-tag.http.html
@@ -0,0 +1,63 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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/top.meta/origin/fetch.http.html b/testing/web-platform/tests/referrer-policy/gen/top.meta/origin/fetch.http.html
new file mode 100644
index 0000000000..9e0eb9df86
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.meta/origin/fetch.http.html
@@ -0,0 +1,143 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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/top.meta/origin/iframe-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/top.meta/origin/iframe-tag.http.html
new file mode 100644
index 0000000000..b2de0586e5
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.meta/origin/iframe-tag.http.html
@@ -0,0 +1,143 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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/top.meta/origin/img-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/top.meta/origin/img-tag.http.html
new file mode 100644
index 0000000000..0be153073e
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.meta/origin/img-tag.http.html
@@ -0,0 +1,143 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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/top.meta/origin/script-tag-dynamic-import.http.html b/testing/web-platform/tests/referrer-policy/gen/top.meta/origin/script-tag-dynamic-import.http.html
new file mode 100644
index 0000000000..9f7dd3db60
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.meta/origin/script-tag-dynamic-import.http.html
@@ -0,0 +1,143 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `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": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for script-tag-dynamic-import to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for script-tag-dynamic-import to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for script-tag-dynamic-import to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for script-tag-dynamic-import to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for script-tag-dynamic-import to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for script-tag-dynamic-import to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for script-tag-dynamic-import to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for script-tag-dynamic-import to same-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for script-tag-dynamic-import to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for script-tag-dynamic-import to same-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for script-tag-dynamic-import to same-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for script-tag-dynamic-import to same-https origin and swap-origin redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/top.meta/origin/script-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/top.meta/origin/script-tag.http.html
new file mode 100644
index 0000000000..1dd703daa8
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.meta/origin/script-tag.http.html
@@ -0,0 +1,143 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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/top.meta/origin/sharedworker-classic.http.html b/testing/web-platform/tests/referrer-policy/gen/top.meta/origin/sharedworker-classic.http.html
new file mode 100644
index 0000000000..f05f62a46b
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.meta/origin/sharedworker-classic.http.html
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<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": [],
+ "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": [],
+ "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/top.meta/origin/sharedworker-module.http.html b/testing/web-platform/tests/referrer-policy/gen/top.meta/origin/sharedworker-module.http.html
new file mode 100644
index 0000000000..1d2334f2b7
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.meta/origin/sharedworker-module.http.html
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `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": [],
+ "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": [],
+ "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/top.meta/origin/worker-classic.http.html b/testing/web-platform/tests/referrer-policy/gen/top.meta/origin/worker-classic.http.html
new file mode 100644
index 0000000000..f7de83ce58
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.meta/origin/worker-classic.http.html
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<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": [],
+ "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": [],
+ "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/top.meta/origin/worker-module.http.html b/testing/web-platform/tests/referrer-policy/gen/top.meta/origin/worker-module.http.html
new file mode 100644
index 0000000000..f5d00f8139
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.meta/origin/worker-module.http.html
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<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": [],
+ "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": [],
+ "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/top.meta/origin/xhr.http.html b/testing/web-platform/tests/referrer-policy/gen/top.meta/origin/xhr.http.html
new file mode 100644
index 0000000000..ce3c63264f
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.meta/origin/xhr.http.html
@@ -0,0 +1,143 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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/top.meta/same-origin/a-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/top.meta/same-origin/a-tag.http.html
new file mode 100644
index 0000000000..e527be69a2
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.meta/same-origin/a-tag.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": "omitted",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "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": [],
+ "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": [],
+ "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/top.meta/same-origin/fetch.http.html b/testing/web-platform/tests/referrer-policy/gen/top.meta/same-origin/fetch.http.html
new file mode 100644
index 0000000000..c9edccb7b0
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.meta/same-origin/fetch.http.html
@@ -0,0 +1,123 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/top.meta/same-origin/iframe-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/top.meta/same-origin/iframe-tag.http.html
new file mode 100644
index 0000000000..cffe9aaf42
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.meta/same-origin/iframe-tag.http.html
@@ -0,0 +1,123 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/top.meta/same-origin/img-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/top.meta/same-origin/img-tag.http.html
new file mode 100644
index 0000000000..169b379a30
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.meta/same-origin/img-tag.http.html
@@ -0,0 +1,123 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/top.meta/same-origin/script-tag-dynamic-import.http.html b/testing/web-platform/tests/referrer-policy/gen/top.meta/same-origin/script-tag-dynamic-import.http.html
new file mode 100644
index 0000000000..e12b8cb5a9
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.meta/same-origin/script-tag-dynamic-import.http.html
@@ -0,0 +1,123 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `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": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for script-tag-dynamic-import to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for script-tag-dynamic-import to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for script-tag-dynamic-import to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for script-tag-dynamic-import to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for script-tag-dynamic-import to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for script-tag-dynamic-import to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for script-tag-dynamic-import to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for script-tag-dynamic-import to same-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag-dynamic-import to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag-dynamic-import to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/top.meta/same-origin/script-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/top.meta/same-origin/script-tag.http.html
new file mode 100644
index 0000000000..f85b8d09ee
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.meta/same-origin/script-tag.http.html
@@ -0,0 +1,123 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/top.meta/same-origin/sharedworker-classic.http.html b/testing/web-platform/tests/referrer-policy/gen/top.meta/same-origin/sharedworker-classic.http.html
new file mode 100644
index 0000000000..dc152cf203
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.meta/same-origin/sharedworker-classic.http.html
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<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": [],
+ "source_scheme": "http",
+ "subresource": "sharedworker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for sharedworker-classic to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "sharedworker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for sharedworker-classic to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/top.meta/same-origin/sharedworker-module.http.html b/testing/web-platform/tests/referrer-policy/gen/top.meta/same-origin/sharedworker-module.http.html
new file mode 100644
index 0000000000..4af9a84e38
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.meta/same-origin/sharedworker-module.http.html
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `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": [],
+ "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": [],
+ "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/top.meta/same-origin/worker-classic.http.html b/testing/web-platform/tests/referrer-policy/gen/top.meta/same-origin/worker-classic.http.html
new file mode 100644
index 0000000000..238e044777
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.meta/same-origin/worker-classic.http.html
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<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": [],
+ "source_scheme": "http",
+ "subresource": "worker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-classic to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "worker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-classic to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/top.meta/same-origin/worker-module.http.html b/testing/web-platform/tests/referrer-policy/gen/top.meta/same-origin/worker-module.http.html
new file mode 100644
index 0000000000..e12a18771c
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.meta/same-origin/worker-module.http.html
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<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": [],
+ "source_scheme": "http",
+ "subresource": "worker-module",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-module to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "worker-module",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-module to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/top.meta/same-origin/xhr.http.html b/testing/web-platform/tests/referrer-policy/gen/top.meta/same-origin/xhr.http.html
new file mode 100644
index 0000000000..f806606e39
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.meta/same-origin/xhr.http.html
@@ -0,0 +1,123 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/top.meta/strict-origin-when-cross-origin/a-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/top.meta/strict-origin-when-cross-origin/a-tag.http.html
new file mode 100644
index 0000000000..c90830faec
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.meta/strict-origin-when-cross-origin/a-tag.http.html
@@ -0,0 +1,63 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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/top.meta/strict-origin-when-cross-origin/fetch.http.html b/testing/web-platform/tests/referrer-policy/gen/top.meta/strict-origin-when-cross-origin/fetch.http.html
new file mode 100644
index 0000000000..76475a2a48
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.meta/strict-origin-when-cross-origin/fetch.http.html
@@ -0,0 +1,143 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/top.meta/strict-origin-when-cross-origin/iframe-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/top.meta/strict-origin-when-cross-origin/iframe-tag.http.html
new file mode 100644
index 0000000000..261b31cea3
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.meta/strict-origin-when-cross-origin/iframe-tag.http.html
@@ -0,0 +1,143 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/top.meta/strict-origin-when-cross-origin/img-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/top.meta/strict-origin-when-cross-origin/img-tag.http.html
new file mode 100644
index 0000000000..f84e23faa9
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.meta/strict-origin-when-cross-origin/img-tag.http.html
@@ -0,0 +1,143 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/top.meta/strict-origin-when-cross-origin/script-tag-dynamic-import.http.html b/testing/web-platform/tests/referrer-policy/gen/top.meta/strict-origin-when-cross-origin/script-tag-dynamic-import.http.html
new file mode 100644
index 0000000000..2a3f6d0b05
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.meta/strict-origin-when-cross-origin/script-tag-dynamic-import.http.html
@@ -0,0 +1,143 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `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": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for script-tag-dynamic-import to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for script-tag-dynamic-import to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for script-tag-dynamic-import to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for script-tag-dynamic-import to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for script-tag-dynamic-import to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for script-tag-dynamic-import to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for script-tag-dynamic-import to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for script-tag-dynamic-import to same-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for script-tag-dynamic-import to same-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for script-tag-dynamic-import to same-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag-dynamic-import to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag-dynamic-import to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/top.meta/strict-origin-when-cross-origin/script-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/top.meta/strict-origin-when-cross-origin/script-tag.http.html
new file mode 100644
index 0000000000..692ccd8156
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.meta/strict-origin-when-cross-origin/script-tag.http.html
@@ -0,0 +1,143 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/top.meta/strict-origin-when-cross-origin/sharedworker-classic.http.html b/testing/web-platform/tests/referrer-policy/gen/top.meta/strict-origin-when-cross-origin/sharedworker-classic.http.html
new file mode 100644
index 0000000000..dbaa8dad70
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.meta/strict-origin-when-cross-origin/sharedworker-classic.http.html
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<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": [],
+ "source_scheme": "http",
+ "subresource": "sharedworker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for sharedworker-classic to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "sharedworker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for sharedworker-classic to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/top.meta/strict-origin-when-cross-origin/sharedworker-module.http.html b/testing/web-platform/tests/referrer-policy/gen/top.meta/strict-origin-when-cross-origin/sharedworker-module.http.html
new file mode 100644
index 0000000000..dca75da7bc
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.meta/strict-origin-when-cross-origin/sharedworker-module.http.html
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `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": [],
+ "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": [],
+ "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/top.meta/strict-origin-when-cross-origin/worker-classic.http.html b/testing/web-platform/tests/referrer-policy/gen/top.meta/strict-origin-when-cross-origin/worker-classic.http.html
new file mode 100644
index 0000000000..fe4cb622a0
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.meta/strict-origin-when-cross-origin/worker-classic.http.html
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<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": [],
+ "source_scheme": "http",
+ "subresource": "worker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-classic to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "worker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-classic to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/top.meta/strict-origin-when-cross-origin/worker-module.http.html b/testing/web-platform/tests/referrer-policy/gen/top.meta/strict-origin-when-cross-origin/worker-module.http.html
new file mode 100644
index 0000000000..03b3224282
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.meta/strict-origin-when-cross-origin/worker-module.http.html
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<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": [],
+ "source_scheme": "http",
+ "subresource": "worker-module",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-module to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "worker-module",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-module to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/top.meta/strict-origin-when-cross-origin/xhr.http.html b/testing/web-platform/tests/referrer-policy/gen/top.meta/strict-origin-when-cross-origin/xhr.http.html
new file mode 100644
index 0000000000..38136d1dfa
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.meta/strict-origin-when-cross-origin/xhr.http.html
@@ -0,0 +1,143 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/top.meta/strict-origin/a-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/top.meta/strict-origin/a-tag.http.html
new file mode 100644
index 0000000000..a0d7b82ff0
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.meta/strict-origin/a-tag.http.html
@@ -0,0 +1,63 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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/top.meta/strict-origin/fetch.http.html b/testing/web-platform/tests/referrer-policy/gen/top.meta/strict-origin/fetch.http.html
new file mode 100644
index 0000000000..e4a723a028
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.meta/strict-origin/fetch.http.html
@@ -0,0 +1,143 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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/top.meta/strict-origin/iframe-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/top.meta/strict-origin/iframe-tag.http.html
new file mode 100644
index 0000000000..a9a3f08183
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.meta/strict-origin/iframe-tag.http.html
@@ -0,0 +1,143 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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/top.meta/strict-origin/img-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/top.meta/strict-origin/img-tag.http.html
new file mode 100644
index 0000000000..61caa7b5de
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.meta/strict-origin/img-tag.http.html
@@ -0,0 +1,143 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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/top.meta/strict-origin/script-tag-dynamic-import.http.html b/testing/web-platform/tests/referrer-policy/gen/top.meta/strict-origin/script-tag-dynamic-import.http.html
new file mode 100644
index 0000000000..107b99e6be
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.meta/strict-origin/script-tag-dynamic-import.http.html
@@ -0,0 +1,143 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `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": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for script-tag-dynamic-import to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for script-tag-dynamic-import to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for script-tag-dynamic-import to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for script-tag-dynamic-import to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for script-tag-dynamic-import to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for script-tag-dynamic-import to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for script-tag-dynamic-import to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for script-tag-dynamic-import to same-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for script-tag-dynamic-import to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for script-tag-dynamic-import to same-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for script-tag-dynamic-import to same-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for script-tag-dynamic-import to same-https origin and swap-origin redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/top.meta/strict-origin/script-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/top.meta/strict-origin/script-tag.http.html
new file mode 100644
index 0000000000..f8502d76ec
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.meta/strict-origin/script-tag.http.html
@@ -0,0 +1,143 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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/top.meta/strict-origin/sharedworker-classic.http.html b/testing/web-platform/tests/referrer-policy/gen/top.meta/strict-origin/sharedworker-classic.http.html
new file mode 100644
index 0000000000..65734aa6dd
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.meta/strict-origin/sharedworker-classic.http.html
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<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": [],
+ "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": [],
+ "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/top.meta/strict-origin/sharedworker-module.http.html b/testing/web-platform/tests/referrer-policy/gen/top.meta/strict-origin/sharedworker-module.http.html
new file mode 100644
index 0000000000..6950b05007
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.meta/strict-origin/sharedworker-module.http.html
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `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": [],
+ "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": [],
+ "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/top.meta/strict-origin/worker-classic.http.html b/testing/web-platform/tests/referrer-policy/gen/top.meta/strict-origin/worker-classic.http.html
new file mode 100644
index 0000000000..5a80852cc1
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.meta/strict-origin/worker-classic.http.html
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<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": [],
+ "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": [],
+ "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/top.meta/strict-origin/worker-module.http.html b/testing/web-platform/tests/referrer-policy/gen/top.meta/strict-origin/worker-module.http.html
new file mode 100644
index 0000000000..64cdd50833
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.meta/strict-origin/worker-module.http.html
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<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": [],
+ "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": [],
+ "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/top.meta/strict-origin/xhr.http.html b/testing/web-platform/tests/referrer-policy/gen/top.meta/strict-origin/xhr.http.html
new file mode 100644
index 0000000000..08fe4b8add
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.meta/strict-origin/xhr.http.html
@@ -0,0 +1,143 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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/top.meta/unsafe-url/a-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/top.meta/unsafe-url/a-tag.http.html
new file mode 100644
index 0000000000..f25dfbc5fd
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.meta/unsafe-url/a-tag.http.html
@@ -0,0 +1,63 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "a-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for a-tag to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "a-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for a-tag to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "a-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for a-tag to same-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "a-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for a-tag to same-https origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/top.meta/unsafe-url/fetch.http.html b/testing/web-platform/tests/referrer-policy/gen/top.meta/unsafe-url/fetch.http.html
new file mode 100644
index 0000000000..46eb2b9d87
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.meta/unsafe-url/fetch.http.html
@@ -0,0 +1,143 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-https origin and swap-origin redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/top.meta/unsafe-url/iframe-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/top.meta/unsafe-url/iframe-tag.http.html
new file mode 100644
index 0000000000..f84dba4815
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.meta/unsafe-url/iframe-tag.http.html
@@ -0,0 +1,143 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-https origin and swap-origin redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/top.meta/unsafe-url/img-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/top.meta/unsafe-url/img-tag.http.html
new file mode 100644
index 0000000000..8f8b278cff
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.meta/unsafe-url/img-tag.http.html
@@ -0,0 +1,143 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-https origin and swap-origin redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/top.meta/unsafe-url/script-tag-dynamic-import.http.html b/testing/web-platform/tests/referrer-policy/gen/top.meta/unsafe-url/script-tag-dynamic-import.http.html
new file mode 100644
index 0000000000..3e50fdaffc
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.meta/unsafe-url/script-tag-dynamic-import.http.html
@@ -0,0 +1,143 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag-dynamic-import to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag-dynamic-import to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag-dynamic-import to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag-dynamic-import to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag-dynamic-import to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag-dynamic-import to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag-dynamic-import to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag-dynamic-import to same-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag-dynamic-import to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag-dynamic-import to same-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag-dynamic-import to same-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag-dynamic-import to same-https origin and swap-origin redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/top.meta/unsafe-url/script-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/top.meta/unsafe-url/script-tag.http.html
new file mode 100644
index 0000000000..b99cb1a636
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.meta/unsafe-url/script-tag.http.html
@@ -0,0 +1,143 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-https origin and swap-origin redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/top.meta/unsafe-url/sharedworker-classic.http.html b/testing/web-platform/tests/referrer-policy/gen/top.meta/unsafe-url/sharedworker-classic.http.html
new file mode 100644
index 0000000000..24db9fcc6a
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.meta/unsafe-url/sharedworker-classic.http.html
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<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": [],
+ "source_scheme": "http",
+ "subresource": "sharedworker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for sharedworker-classic to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "sharedworker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for sharedworker-classic to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/top.meta/unsafe-url/sharedworker-module.http.html b/testing/web-platform/tests/referrer-policy/gen/top.meta/unsafe-url/sharedworker-module.http.html
new file mode 100644
index 0000000000..21fa949171
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.meta/unsafe-url/sharedworker-module.http.html
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `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": [],
+ "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": [],
+ "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/top.meta/unsafe-url/worker-classic.http.html b/testing/web-platform/tests/referrer-policy/gen/top.meta/unsafe-url/worker-classic.http.html
new file mode 100644
index 0000000000..0d76a82ae5
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.meta/unsafe-url/worker-classic.http.html
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<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": [],
+ "source_scheme": "http",
+ "subresource": "worker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-classic to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "worker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-classic to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/top.meta/unsafe-url/worker-module.http.html b/testing/web-platform/tests/referrer-policy/gen/top.meta/unsafe-url/worker-module.http.html
new file mode 100644
index 0000000000..2725051576
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.meta/unsafe-url/worker-module.http.html
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<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": [],
+ "source_scheme": "http",
+ "subresource": "worker-module",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-module to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "worker-module",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-module to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/top.meta/unsafe-url/xhr.http.html b/testing/web-platform/tests/referrer-policy/gen/top.meta/unsafe-url/xhr.http.html
new file mode 100644
index 0000000000..b77d9ed3df
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.meta/unsafe-url/xhr.http.html
@@ -0,0 +1,143 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-https origin and swap-origin redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/top.meta/unset/a-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/top.meta/unset/a-tag.http.html
new file mode 100644
index 0000000000..72e159c72e
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.meta/unset/a-tag.http.html
@@ -0,0 +1,62 @@
+<!DOCTYPE html>
+<!-- DO 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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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/top.meta/unset/fetch.http.html b/testing/web-platform/tests/referrer-policy/gen/top.meta/unset/fetch.http.html
new file mode 100644
index 0000000000..1dfb592eeb
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.meta/unset/fetch.http.html
@@ -0,0 +1,142 @@
+<!DOCTYPE html>
+<!-- DO 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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/top.meta/unset/iframe-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/top.meta/unset/iframe-tag.http.html
new file mode 100644
index 0000000000..557d6a5323
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.meta/unset/iframe-tag.http.html
@@ -0,0 +1,142 @@
+<!DOCTYPE html>
+<!-- DO 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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/top.meta/unset/img-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/top.meta/unset/img-tag.http.html
new file mode 100644
index 0000000000..3987df1518
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.meta/unset/img-tag.http.html
@@ -0,0 +1,142 @@
+<!DOCTYPE html>
+<!-- DO 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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/top.meta/unset/script-tag-dynamic-import.http.html b/testing/web-platform/tests/referrer-policy/gen/top.meta/unset/script-tag-dynamic-import.http.html
new file mode 100644
index 0000000000..6444480eb9
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.meta/unset/script-tag-dynamic-import.http.html
@@ -0,0 +1,142 @@
+<!DOCTYPE html>
+<!-- DO 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": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for script-tag-dynamic-import to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for script-tag-dynamic-import to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for script-tag-dynamic-import to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for script-tag-dynamic-import to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for script-tag-dynamic-import to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for script-tag-dynamic-import to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for script-tag-dynamic-import to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for script-tag-dynamic-import to same-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for script-tag-dynamic-import to same-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for script-tag-dynamic-import to same-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag-dynamic-import to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag-dynamic-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag-dynamic-import to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/top.meta/unset/script-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/top.meta/unset/script-tag.http.html
new file mode 100644
index 0000000000..788c8d04f2
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.meta/unset/script-tag.http.html
@@ -0,0 +1,142 @@
+<!DOCTYPE html>
+<!-- DO 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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/top.meta/unset/sharedworker-classic.http.html b/testing/web-platform/tests/referrer-policy/gen/top.meta/unset/sharedworker-classic.http.html
new file mode 100644
index 0000000000..1bc6f04b8c
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.meta/unset/sharedworker-classic.http.html
@@ -0,0 +1,42 @@
+<!DOCTYPE html>
+<!-- DO 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": [],
+ "source_scheme": "http",
+ "subresource": "sharedworker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for sharedworker-classic to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "sharedworker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for sharedworker-classic to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/top.meta/unset/sharedworker-module.http.html b/testing/web-platform/tests/referrer-policy/gen/top.meta/unset/sharedworker-module.http.html
new file mode 100644
index 0000000000..a24ee872ad
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.meta/unset/sharedworker-module.http.html
@@ -0,0 +1,42 @@
+<!DOCTYPE html>
+<!-- DO 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": [],
+ "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": [],
+ "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/top.meta/unset/worker-classic.http.html b/testing/web-platform/tests/referrer-policy/gen/top.meta/unset/worker-classic.http.html
new file mode 100644
index 0000000000..7e6e8f3c5f
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.meta/unset/worker-classic.http.html
@@ -0,0 +1,42 @@
+<!DOCTYPE html>
+<!-- DO 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": [],
+ "source_scheme": "http",
+ "subresource": "worker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-classic to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "worker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-classic to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/top.meta/unset/worker-module.http.html b/testing/web-platform/tests/referrer-policy/gen/top.meta/unset/worker-module.http.html
new file mode 100644
index 0000000000..ae453ee0f0
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.meta/unset/worker-module.http.html
@@ -0,0 +1,42 @@
+<!DOCTYPE html>
+<!-- DO 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": [],
+ "source_scheme": "http",
+ "subresource": "worker-module",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-module to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "worker-module",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-module to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/top.meta/unset/xhr.http.html b/testing/web-platform/tests/referrer-policy/gen/top.meta/unset/xhr.http.html
new file mode 100644
index 0000000000..866577c336
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/top.meta/unset/xhr.http.html
@@ -0,0 +1,142 @@
+<!DOCTYPE html>
+<!-- DO 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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "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": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/worker-classic.http-rp/no-referrer-when-downgrade/fetch.http.html b/testing/web-platform/tests/referrer-policy/gen/worker-classic.http-rp/no-referrer-when-downgrade/fetch.http.html
new file mode 100644
index 0000000000..dac3a68322
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/worker-classic.http-rp/no-referrer-when-downgrade/fetch.http.html
@@ -0,0 +1,275 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "sourceContextType": "worker-classic"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "sourceContextType": "worker-classic"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "sourceContextType": "worker-classic"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "sourceContextType": "worker-classic"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "sourceContextType": "worker-classic"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "sourceContextType": "worker-classic"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "sourceContextType": "worker-classic"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "sourceContextType": "worker-classic"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "sourceContextType": "worker-classic"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "sourceContextType": "worker-classic"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "sourceContextType": "worker-classic"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "sourceContextType": "worker-classic"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-https origin and swap-origin redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/worker-classic.http-rp/no-referrer-when-downgrade/worker-classic.http.html b/testing/web-platform/tests/referrer-policy/gen/worker-classic.http-rp/no-referrer-when-downgrade/worker-classic.http.html
new file mode 100644
index 0000000000..18ba58d76e
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/worker-classic.http-rp/no-referrer-when-downgrade/worker-classic.http.html
@@ -0,0 +1,65 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "sourceContextType": "worker-classic"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "worker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-classic to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "sourceContextType": "worker-classic"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "worker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-classic to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/worker-classic.http-rp/no-referrer-when-downgrade/worker-module.http.html b/testing/web-platform/tests/referrer-policy/gen/worker-classic.http-rp/no-referrer-when-downgrade/worker-module.http.html
new file mode 100644
index 0000000000..7f15535572
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/worker-classic.http-rp/no-referrer-when-downgrade/worker-module.http.html
@@ -0,0 +1,65 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "sourceContextType": "worker-classic"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "worker-module",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-module to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "sourceContextType": "worker-classic"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "worker-module",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-module to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/worker-classic.http-rp/no-referrer-when-downgrade/xhr.http.html b/testing/web-platform/tests/referrer-policy/gen/worker-classic.http-rp/no-referrer-when-downgrade/xhr.http.html
new file mode 100644
index 0000000000..d3952c2944
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/worker-classic.http-rp/no-referrer-when-downgrade/xhr.http.html
@@ -0,0 +1,275 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "sourceContextType": "worker-classic"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "sourceContextType": "worker-classic"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "sourceContextType": "worker-classic"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "sourceContextType": "worker-classic"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "sourceContextType": "worker-classic"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "sourceContextType": "worker-classic"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "sourceContextType": "worker-classic"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "sourceContextType": "worker-classic"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "sourceContextType": "worker-classic"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "sourceContextType": "worker-classic"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "sourceContextType": "worker-classic"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "sourceContextType": "worker-classic"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-https origin and swap-origin redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/worker-classic.http-rp/no-referrer/fetch.http.html b/testing/web-platform/tests/referrer-policy/gen/worker-classic.http-rp/no-referrer/fetch.http.html
new file mode 100644
index 0000000000..7fd76e6343
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/worker-classic.http-rp/no-referrer/fetch.http.html
@@ -0,0 +1,275 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "omitted",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "sourceContextType": "worker-classic"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for fetch to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "sourceContextType": "worker-classic"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for fetch to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "sourceContextType": "worker-classic"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for fetch to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "sourceContextType": "worker-classic"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for fetch to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "sourceContextType": "worker-classic"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for fetch to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "sourceContextType": "worker-classic"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for fetch to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "sourceContextType": "worker-classic"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for fetch to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "sourceContextType": "worker-classic"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for fetch to same-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "sourceContextType": "worker-classic"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for fetch to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "same-https",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "sourceContextType": "worker-classic"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for fetch to same-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "sourceContextType": "worker-classic"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for fetch to same-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "sourceContextType": "worker-classic"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for fetch to same-https origin and swap-origin redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/worker-classic.http-rp/no-referrer/worker-classic.http.html b/testing/web-platform/tests/referrer-policy/gen/worker-classic.http-rp/no-referrer/worker-classic.http.html
new file mode 100644
index 0000000000..5bec21542b
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/worker-classic.http-rp/no-referrer/worker-classic.http.html
@@ -0,0 +1,65 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "omitted",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "sourceContextType": "worker-classic"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "worker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for worker-classic to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "sourceContextType": "worker-classic"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "worker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for worker-classic to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/worker-classic.http-rp/no-referrer/worker-module.http.html b/testing/web-platform/tests/referrer-policy/gen/worker-classic.http-rp/no-referrer/worker-module.http.html
new file mode 100644
index 0000000000..ce37d95eb3
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/worker-classic.http-rp/no-referrer/worker-module.http.html
@@ -0,0 +1,65 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "omitted",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "sourceContextType": "worker-classic"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "worker-module",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for worker-module to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "sourceContextType": "worker-classic"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "worker-module",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for worker-module to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/worker-classic.http-rp/no-referrer/xhr.http.html b/testing/web-platform/tests/referrer-policy/gen/worker-classic.http-rp/no-referrer/xhr.http.html
new file mode 100644
index 0000000000..c86c9717eb
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/worker-classic.http-rp/no-referrer/xhr.http.html
@@ -0,0 +1,275 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "omitted",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "sourceContextType": "worker-classic"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for xhr to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "sourceContextType": "worker-classic"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for xhr to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "sourceContextType": "worker-classic"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for xhr to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "sourceContextType": "worker-classic"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for xhr to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "sourceContextType": "worker-classic"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for xhr to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "sourceContextType": "worker-classic"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for xhr to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "sourceContextType": "worker-classic"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for xhr to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "sourceContextType": "worker-classic"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for xhr to same-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "sourceContextType": "worker-classic"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for xhr to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "same-https",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "sourceContextType": "worker-classic"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for xhr to same-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "sourceContextType": "worker-classic"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for xhr to same-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "sourceContextType": "worker-classic"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for xhr to same-https origin and swap-origin redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/worker-classic.http-rp/origin-when-cross-origin/fetch.http.html b/testing/web-platform/tests/referrer-policy/gen/worker-classic.http-rp/origin-when-cross-origin/fetch.http.html
new file mode 100644
index 0000000000..fd5c1c40b4
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/worker-classic.http-rp/origin-when-cross-origin/fetch.http.html
@@ -0,0 +1,275 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "worker-classic"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for fetch to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "worker-classic"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for fetch to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "worker-classic"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for fetch to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "worker-classic"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for fetch to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "worker-classic"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for fetch to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "worker-classic"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for fetch to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "worker-classic"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for fetch to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "worker-classic"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for fetch to same-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "worker-classic"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for fetch to same-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "worker-classic"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for fetch to same-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "worker-classic"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "worker-classic"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/worker-classic.http-rp/origin-when-cross-origin/worker-classic.http.html b/testing/web-platform/tests/referrer-policy/gen/worker-classic.http-rp/origin-when-cross-origin/worker-classic.http.html
new file mode 100644
index 0000000000..0faa7b5885
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/worker-classic.http-rp/origin-when-cross-origin/worker-classic.http.html
@@ -0,0 +1,65 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "worker-classic"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "worker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-classic to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "worker-classic"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "worker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-classic to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/worker-classic.http-rp/origin-when-cross-origin/worker-module.http.html b/testing/web-platform/tests/referrer-policy/gen/worker-classic.http-rp/origin-when-cross-origin/worker-module.http.html
new file mode 100644
index 0000000000..186c854ae9
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/worker-classic.http-rp/origin-when-cross-origin/worker-module.http.html
@@ -0,0 +1,65 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "worker-classic"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "worker-module",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-module to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "worker-classic"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "worker-module",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-module to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/worker-classic.http-rp/origin-when-cross-origin/xhr.http.html b/testing/web-platform/tests/referrer-policy/gen/worker-classic.http-rp/origin-when-cross-origin/xhr.http.html
new file mode 100644
index 0000000000..1074f48768
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/worker-classic.http-rp/origin-when-cross-origin/xhr.http.html
@@ -0,0 +1,275 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "worker-classic"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for xhr to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "worker-classic"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for xhr to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "worker-classic"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for xhr to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "worker-classic"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for xhr to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "worker-classic"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for xhr to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "worker-classic"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for xhr to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "worker-classic"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for xhr to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "worker-classic"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for xhr to same-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "worker-classic"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for xhr to same-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "worker-classic"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for xhr to same-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "worker-classic"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "worker-classic"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/worker-classic.http-rp/origin/fetch.http.html b/testing/web-platform/tests/referrer-policy/gen/worker-classic.http-rp/origin/fetch.http.html
new file mode 100644
index 0000000000..6cdc0b41d8
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/worker-classic.http-rp/origin/fetch.http.html
@@ -0,0 +1,275 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "sourceContextType": "worker-classic"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for fetch to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "sourceContextType": "worker-classic"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for fetch to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "sourceContextType": "worker-classic"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for fetch to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "sourceContextType": "worker-classic"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for fetch to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "sourceContextType": "worker-classic"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for fetch to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "sourceContextType": "worker-classic"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for fetch to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "sourceContextType": "worker-classic"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for fetch to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "sourceContextType": "worker-classic"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for fetch to same-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "sourceContextType": "worker-classic"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for fetch to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "sourceContextType": "worker-classic"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for fetch to same-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "sourceContextType": "worker-classic"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for fetch to same-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "sourceContextType": "worker-classic"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for fetch to same-https origin and swap-origin redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/worker-classic.http-rp/origin/worker-classic.http.html b/testing/web-platform/tests/referrer-policy/gen/worker-classic.http-rp/origin/worker-classic.http.html
new file mode 100644
index 0000000000..d4e7d5d815
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/worker-classic.http-rp/origin/worker-classic.http.html
@@ -0,0 +1,65 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "origin",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "sourceContextType": "worker-classic"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "worker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for worker-classic to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "sourceContextType": "worker-classic"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "worker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for worker-classic to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/worker-classic.http-rp/origin/worker-module.http.html b/testing/web-platform/tests/referrer-policy/gen/worker-classic.http-rp/origin/worker-module.http.html
new file mode 100644
index 0000000000..aa988d50a7
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/worker-classic.http-rp/origin/worker-module.http.html
@@ -0,0 +1,65 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "origin",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "sourceContextType": "worker-classic"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "worker-module",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for worker-module to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "sourceContextType": "worker-classic"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "worker-module",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for worker-module to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/worker-classic.http-rp/origin/xhr.http.html b/testing/web-platform/tests/referrer-policy/gen/worker-classic.http-rp/origin/xhr.http.html
new file mode 100644
index 0000000000..ccbf111956
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/worker-classic.http-rp/origin/xhr.http.html
@@ -0,0 +1,275 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "sourceContextType": "worker-classic"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for xhr to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "sourceContextType": "worker-classic"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for xhr to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "sourceContextType": "worker-classic"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for xhr to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "sourceContextType": "worker-classic"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for xhr to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "sourceContextType": "worker-classic"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for xhr to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "sourceContextType": "worker-classic"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for xhr to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "sourceContextType": "worker-classic"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for xhr to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "sourceContextType": "worker-classic"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for xhr to same-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "sourceContextType": "worker-classic"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for xhr to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "sourceContextType": "worker-classic"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for xhr to same-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "sourceContextType": "worker-classic"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for xhr to same-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "sourceContextType": "worker-classic"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for xhr to same-https origin and swap-origin redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/worker-classic.http-rp/same-origin/fetch.http.html b/testing/web-platform/tests/referrer-policy/gen/worker-classic.http-rp/same-origin/fetch.http.html
new file mode 100644
index 0000000000..a1bc897efc
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/worker-classic.http-rp/same-origin/fetch.http.html
@@ -0,0 +1,233 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "omitted",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "same-origin"
+ }
+ ],
+ "sourceContextType": "worker-classic"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for fetch to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "same-origin"
+ }
+ ],
+ "sourceContextType": "worker-classic"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for fetch to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "same-origin"
+ }
+ ],
+ "sourceContextType": "worker-classic"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for fetch to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "same-origin"
+ }
+ ],
+ "sourceContextType": "worker-classic"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for fetch to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "same-origin"
+ }
+ ],
+ "sourceContextType": "worker-classic"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for fetch to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "same-origin"
+ }
+ ],
+ "sourceContextType": "worker-classic"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for fetch to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "same-origin"
+ }
+ ],
+ "sourceContextType": "worker-classic"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for fetch to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "same-origin"
+ }
+ ],
+ "sourceContextType": "worker-classic"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for fetch to same-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "same-origin"
+ }
+ ],
+ "sourceContextType": "worker-classic"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "same-origin"
+ }
+ ],
+ "sourceContextType": "worker-classic"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/worker-classic.http-rp/same-origin/worker-classic.http.html b/testing/web-platform/tests/referrer-policy/gen/worker-classic.http-rp/same-origin/worker-classic.http.html
new file mode 100644
index 0000000000..520c0b65c0
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/worker-classic.http-rp/same-origin/worker-classic.http.html
@@ -0,0 +1,65 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "same-origin"
+ }
+ ],
+ "sourceContextType": "worker-classic"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "worker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-classic to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "same-origin"
+ }
+ ],
+ "sourceContextType": "worker-classic"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "worker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-classic to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/worker-classic.http-rp/same-origin/worker-module.http.html b/testing/web-platform/tests/referrer-policy/gen/worker-classic.http-rp/same-origin/worker-module.http.html
new file mode 100644
index 0000000000..8487eb46ef
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/worker-classic.http-rp/same-origin/worker-module.http.html
@@ -0,0 +1,65 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "same-origin"
+ }
+ ],
+ "sourceContextType": "worker-classic"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "worker-module",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-module to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "same-origin"
+ }
+ ],
+ "sourceContextType": "worker-classic"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "worker-module",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-module to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/worker-classic.http-rp/same-origin/xhr.http.html b/testing/web-platform/tests/referrer-policy/gen/worker-classic.http-rp/same-origin/xhr.http.html
new file mode 100644
index 0000000000..bbed4e8be2
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/worker-classic.http-rp/same-origin/xhr.http.html
@@ -0,0 +1,233 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "omitted",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "same-origin"
+ }
+ ],
+ "sourceContextType": "worker-classic"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for xhr to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "same-origin"
+ }
+ ],
+ "sourceContextType": "worker-classic"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for xhr to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "same-origin"
+ }
+ ],
+ "sourceContextType": "worker-classic"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for xhr to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "same-origin"
+ }
+ ],
+ "sourceContextType": "worker-classic"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for xhr to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "same-origin"
+ }
+ ],
+ "sourceContextType": "worker-classic"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for xhr to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "same-origin"
+ }
+ ],
+ "sourceContextType": "worker-classic"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for xhr to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "same-origin"
+ }
+ ],
+ "sourceContextType": "worker-classic"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for xhr to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "same-origin"
+ }
+ ],
+ "sourceContextType": "worker-classic"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for xhr to same-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "same-origin"
+ }
+ ],
+ "sourceContextType": "worker-classic"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "same-origin"
+ }
+ ],
+ "sourceContextType": "worker-classic"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/worker-classic.http-rp/strict-origin-when-cross-origin/fetch.http.html b/testing/web-platform/tests/referrer-policy/gen/worker-classic.http-rp/strict-origin-when-cross-origin/fetch.http.html
new file mode 100644
index 0000000000..7dd1c32a41
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/worker-classic.http-rp/strict-origin-when-cross-origin/fetch.http.html
@@ -0,0 +1,275 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "worker-classic"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for fetch to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "worker-classic"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for fetch to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "worker-classic"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for fetch to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "worker-classic"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for fetch to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "worker-classic"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for fetch to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "worker-classic"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for fetch to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "worker-classic"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for fetch to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "worker-classic"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for fetch to same-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "worker-classic"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for fetch to same-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "worker-classic"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for fetch to same-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "worker-classic"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "worker-classic"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/worker-classic.http-rp/strict-origin-when-cross-origin/worker-classic.http.html b/testing/web-platform/tests/referrer-policy/gen/worker-classic.http-rp/strict-origin-when-cross-origin/worker-classic.http.html
new file mode 100644
index 0000000000..b4cf59c956
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/worker-classic.http-rp/strict-origin-when-cross-origin/worker-classic.http.html
@@ -0,0 +1,65 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "worker-classic"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "worker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-classic to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "worker-classic"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "worker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-classic to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/worker-classic.http-rp/strict-origin-when-cross-origin/worker-module.http.html b/testing/web-platform/tests/referrer-policy/gen/worker-classic.http-rp/strict-origin-when-cross-origin/worker-module.http.html
new file mode 100644
index 0000000000..0abbb2c83c
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/worker-classic.http-rp/strict-origin-when-cross-origin/worker-module.http.html
@@ -0,0 +1,65 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "worker-classic"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "worker-module",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-module to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "worker-classic"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "worker-module",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-module to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/worker-classic.http-rp/strict-origin-when-cross-origin/xhr.http.html b/testing/web-platform/tests/referrer-policy/gen/worker-classic.http-rp/strict-origin-when-cross-origin/xhr.http.html
new file mode 100644
index 0000000000..4438134838
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/worker-classic.http-rp/strict-origin-when-cross-origin/xhr.http.html
@@ -0,0 +1,275 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "worker-classic"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for xhr to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "worker-classic"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for xhr to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "worker-classic"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for xhr to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "worker-classic"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for xhr to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "worker-classic"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for xhr to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "worker-classic"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for xhr to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "worker-classic"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for xhr to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "worker-classic"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for xhr to same-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "worker-classic"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for xhr to same-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "worker-classic"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for xhr to same-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "worker-classic"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "worker-classic"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/worker-classic.http-rp/strict-origin/fetch.http.html b/testing/web-platform/tests/referrer-policy/gen/worker-classic.http-rp/strict-origin/fetch.http.html
new file mode 100644
index 0000000000..491266ebaf
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/worker-classic.http-rp/strict-origin/fetch.http.html
@@ -0,0 +1,275 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "sourceContextType": "worker-classic"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for fetch to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "sourceContextType": "worker-classic"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for fetch to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "sourceContextType": "worker-classic"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for fetch to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "sourceContextType": "worker-classic"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for fetch to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "sourceContextType": "worker-classic"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for fetch to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "sourceContextType": "worker-classic"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for fetch to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "sourceContextType": "worker-classic"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for fetch to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "sourceContextType": "worker-classic"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for fetch to same-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "sourceContextType": "worker-classic"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for fetch to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "sourceContextType": "worker-classic"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for fetch to same-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "sourceContextType": "worker-classic"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for fetch to same-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "sourceContextType": "worker-classic"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for fetch to same-https origin and swap-origin redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/worker-classic.http-rp/strict-origin/worker-classic.http.html b/testing/web-platform/tests/referrer-policy/gen/worker-classic.http-rp/strict-origin/worker-classic.http.html
new file mode 100644
index 0000000000..773126f571
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/worker-classic.http-rp/strict-origin/worker-classic.http.html
@@ -0,0 +1,65 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "origin",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "sourceContextType": "worker-classic"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "worker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for worker-classic to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "sourceContextType": "worker-classic"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "worker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for worker-classic to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/worker-classic.http-rp/strict-origin/worker-module.http.html b/testing/web-platform/tests/referrer-policy/gen/worker-classic.http-rp/strict-origin/worker-module.http.html
new file mode 100644
index 0000000000..59a6f8b15a
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/worker-classic.http-rp/strict-origin/worker-module.http.html
@@ -0,0 +1,65 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "origin",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "sourceContextType": "worker-classic"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "worker-module",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for worker-module to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "sourceContextType": "worker-classic"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "worker-module",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for worker-module to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/worker-classic.http-rp/strict-origin/xhr.http.html b/testing/web-platform/tests/referrer-policy/gen/worker-classic.http-rp/strict-origin/xhr.http.html
new file mode 100644
index 0000000000..cd9a48a353
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/worker-classic.http-rp/strict-origin/xhr.http.html
@@ -0,0 +1,275 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "sourceContextType": "worker-classic"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for xhr to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "sourceContextType": "worker-classic"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for xhr to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "sourceContextType": "worker-classic"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for xhr to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "sourceContextType": "worker-classic"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for xhr to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "sourceContextType": "worker-classic"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for xhr to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "sourceContextType": "worker-classic"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for xhr to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "sourceContextType": "worker-classic"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for xhr to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "sourceContextType": "worker-classic"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for xhr to same-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "sourceContextType": "worker-classic"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for xhr to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "sourceContextType": "worker-classic"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for xhr to same-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "sourceContextType": "worker-classic"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for xhr to same-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "sourceContextType": "worker-classic"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for xhr to same-https origin and swap-origin redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/worker-classic.http-rp/unsafe-url/fetch.http.html b/testing/web-platform/tests/referrer-policy/gen/worker-classic.http-rp/unsafe-url/fetch.http.html
new file mode 100644
index 0000000000..39790d452f
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/worker-classic.http-rp/unsafe-url/fetch.http.html
@@ -0,0 +1,275 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="no-referrer">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "sourceContextType": "worker-classic"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "sourceContextType": "worker-classic"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "sourceContextType": "worker-classic"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "sourceContextType": "worker-classic"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "sourceContextType": "worker-classic"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "sourceContextType": "worker-classic"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "sourceContextType": "worker-classic"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "sourceContextType": "worker-classic"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "sourceContextType": "worker-classic"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "sourceContextType": "worker-classic"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "sourceContextType": "worker-classic"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "sourceContextType": "worker-classic"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-https origin and swap-origin redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/worker-classic.http-rp/unsafe-url/worker-classic.http.html b/testing/web-platform/tests/referrer-policy/gen/worker-classic.http-rp/unsafe-url/worker-classic.http.html
new file mode 100644
index 0000000000..0f6f2140f3
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/worker-classic.http-rp/unsafe-url/worker-classic.http.html
@@ -0,0 +1,65 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="no-referrer">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "sourceContextType": "worker-classic"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "worker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-classic to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "sourceContextType": "worker-classic"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "worker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-classic to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/worker-classic.http-rp/unsafe-url/worker-module.http.html b/testing/web-platform/tests/referrer-policy/gen/worker-classic.http-rp/unsafe-url/worker-module.http.html
new file mode 100644
index 0000000000..7ef0c81886
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/worker-classic.http-rp/unsafe-url/worker-module.http.html
@@ -0,0 +1,65 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="no-referrer">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "sourceContextType": "worker-classic"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "worker-module",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-module to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "sourceContextType": "worker-classic"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "worker-module",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-module to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/worker-classic.http-rp/unsafe-url/xhr.http.html b/testing/web-platform/tests/referrer-policy/gen/worker-classic.http-rp/unsafe-url/xhr.http.html
new file mode 100644
index 0000000000..31ffe14974
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/worker-classic.http-rp/unsafe-url/xhr.http.html
@@ -0,0 +1,275 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="no-referrer">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "sourceContextType": "worker-classic"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "sourceContextType": "worker-classic"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "sourceContextType": "worker-classic"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "sourceContextType": "worker-classic"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "sourceContextType": "worker-classic"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "sourceContextType": "worker-classic"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "sourceContextType": "worker-classic"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "sourceContextType": "worker-classic"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "sourceContextType": "worker-classic"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "sourceContextType": "worker-classic"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "sourceContextType": "worker-classic"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "sourceContextType": "worker-classic"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-https origin and swap-origin redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/worker-classic.http-rp/unset/fetch.http.html b/testing/web-platform/tests/referrer-policy/gen/worker-classic.http-rp/unset/fetch.http.html
new file mode 100644
index 0000000000..107e014414
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/worker-classic.http-rp/unset/fetch.http.html
@@ -0,0 +1,203 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "worker-classic"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for fetch to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "worker-classic"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for fetch to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "worker-classic"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for fetch to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "worker-classic"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for fetch to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "worker-classic"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for fetch to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "worker-classic"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for fetch to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "worker-classic"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for fetch to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "worker-classic"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for fetch to same-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "worker-classic"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for fetch to same-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "worker-classic"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for fetch to same-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "worker-classic"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "worker-classic"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/worker-classic.http-rp/unset/worker-classic.http.html b/testing/web-platform/tests/referrer-policy/gen/worker-classic.http-rp/unset/worker-classic.http.html
new file mode 100644
index 0000000000..daa20c335d
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/worker-classic.http-rp/unset/worker-classic.http.html
@@ -0,0 +1,53 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "worker-classic"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "worker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-classic to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "worker-classic"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "worker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-classic to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/worker-classic.http-rp/unset/worker-module.http.html b/testing/web-platform/tests/referrer-policy/gen/worker-classic.http-rp/unset/worker-module.http.html
new file mode 100644
index 0000000000..7d9e4dfc8e
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/worker-classic.http-rp/unset/worker-module.http.html
@@ -0,0 +1,53 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "worker-classic"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "worker-module",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-module to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "worker-classic"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "worker-module",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-module to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/worker-classic.http-rp/unset/xhr.http.html b/testing/web-platform/tests/referrer-policy/gen/worker-classic.http-rp/unset/xhr.http.html
new file mode 100644
index 0000000000..8e8d13831f
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/worker-classic.http-rp/unset/xhr.http.html
@@ -0,0 +1,203 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "worker-classic"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for xhr to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "worker-classic"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for xhr to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "worker-classic"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for xhr to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "worker-classic"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for xhr to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "worker-classic"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for xhr to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "worker-classic"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for xhr to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "worker-classic"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for xhr to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "worker-classic"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for xhr to same-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "worker-classic"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for xhr to same-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "worker-classic"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for xhr to same-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "worker-classic"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "worker-classic"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/worker-module.http-rp/no-referrer-when-downgrade/fetch.http.html b/testing/web-platform/tests/referrer-policy/gen/worker-module.http-rp/no-referrer-when-downgrade/fetch.http.html
new file mode 100644
index 0000000000..af82605922
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/worker-module.http-rp/no-referrer-when-downgrade/fetch.http.html
@@ -0,0 +1,275 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "sourceContextType": "worker-module"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "sourceContextType": "worker-module"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "sourceContextType": "worker-module"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "sourceContextType": "worker-module"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "sourceContextType": "worker-module"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "sourceContextType": "worker-module"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "sourceContextType": "worker-module"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "sourceContextType": "worker-module"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "sourceContextType": "worker-module"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "sourceContextType": "worker-module"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "sourceContextType": "worker-module"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "sourceContextType": "worker-module"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-https origin and swap-origin redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/worker-module.http-rp/no-referrer-when-downgrade/worker-classic.http.html b/testing/web-platform/tests/referrer-policy/gen/worker-module.http-rp/no-referrer-when-downgrade/worker-classic.http.html
new file mode 100644
index 0000000000..d2a9ba1b3a
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/worker-module.http-rp/no-referrer-when-downgrade/worker-classic.http.html
@@ -0,0 +1,65 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "sourceContextType": "worker-module"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "worker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-classic to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "sourceContextType": "worker-module"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "worker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-classic to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/worker-module.http-rp/no-referrer-when-downgrade/worker-module.http.html b/testing/web-platform/tests/referrer-policy/gen/worker-module.http-rp/no-referrer-when-downgrade/worker-module.http.html
new file mode 100644
index 0000000000..6ac89f1689
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/worker-module.http-rp/no-referrer-when-downgrade/worker-module.http.html
@@ -0,0 +1,65 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "sourceContextType": "worker-module"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "worker-module",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-module to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "sourceContextType": "worker-module"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "worker-module",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-module to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/worker-module.http-rp/no-referrer-when-downgrade/xhr.http.html b/testing/web-platform/tests/referrer-policy/gen/worker-module.http-rp/no-referrer-when-downgrade/xhr.http.html
new file mode 100644
index 0000000000..a490391314
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/worker-module.http-rp/no-referrer-when-downgrade/xhr.http.html
@@ -0,0 +1,275 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "sourceContextType": "worker-module"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "sourceContextType": "worker-module"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "sourceContextType": "worker-module"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "sourceContextType": "worker-module"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "sourceContextType": "worker-module"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "sourceContextType": "worker-module"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "sourceContextType": "worker-module"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "sourceContextType": "worker-module"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "sourceContextType": "worker-module"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "sourceContextType": "worker-module"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "sourceContextType": "worker-module"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "no-referrer-when-downgrade"
+ }
+ ],
+ "sourceContextType": "worker-module"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-https origin and swap-origin redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/worker-module.http-rp/no-referrer/fetch.http.html b/testing/web-platform/tests/referrer-policy/gen/worker-module.http-rp/no-referrer/fetch.http.html
new file mode 100644
index 0000000000..bc8b3cdf0c
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/worker-module.http-rp/no-referrer/fetch.http.html
@@ -0,0 +1,275 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "omitted",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "sourceContextType": "worker-module"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for fetch to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "sourceContextType": "worker-module"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for fetch to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "sourceContextType": "worker-module"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for fetch to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "sourceContextType": "worker-module"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for fetch to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "sourceContextType": "worker-module"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for fetch to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "sourceContextType": "worker-module"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for fetch to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "sourceContextType": "worker-module"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for fetch to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "sourceContextType": "worker-module"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for fetch to same-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "sourceContextType": "worker-module"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for fetch to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "same-https",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "sourceContextType": "worker-module"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for fetch to same-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "sourceContextType": "worker-module"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for fetch to same-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "sourceContextType": "worker-module"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for fetch to same-https origin and swap-origin redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/worker-module.http-rp/no-referrer/worker-classic.http.html b/testing/web-platform/tests/referrer-policy/gen/worker-module.http-rp/no-referrer/worker-classic.http.html
new file mode 100644
index 0000000000..19eadf3a67
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/worker-module.http-rp/no-referrer/worker-classic.http.html
@@ -0,0 +1,65 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "omitted",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "sourceContextType": "worker-module"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "worker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for worker-classic to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "sourceContextType": "worker-module"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "worker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for worker-classic to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/worker-module.http-rp/no-referrer/worker-module.http.html b/testing/web-platform/tests/referrer-policy/gen/worker-module.http-rp/no-referrer/worker-module.http.html
new file mode 100644
index 0000000000..298db8c8ca
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/worker-module.http-rp/no-referrer/worker-module.http.html
@@ -0,0 +1,65 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "omitted",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "sourceContextType": "worker-module"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "worker-module",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for worker-module to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "sourceContextType": "worker-module"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "worker-module",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for worker-module to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/worker-module.http-rp/no-referrer/xhr.http.html b/testing/web-platform/tests/referrer-policy/gen/worker-module.http-rp/no-referrer/xhr.http.html
new file mode 100644
index 0000000000..0d4d12fa3b
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/worker-module.http-rp/no-referrer/xhr.http.html
@@ -0,0 +1,275 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "omitted",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "sourceContextType": "worker-module"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for xhr to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "sourceContextType": "worker-module"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for xhr to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "sourceContextType": "worker-module"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for xhr to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "sourceContextType": "worker-module"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for xhr to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "sourceContextType": "worker-module"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for xhr to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "sourceContextType": "worker-module"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for xhr to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "sourceContextType": "worker-module"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for xhr to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "sourceContextType": "worker-module"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for xhr to same-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "sourceContextType": "worker-module"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for xhr to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "same-https",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "sourceContextType": "worker-module"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for xhr to same-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "sourceContextType": "worker-module"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for xhr to same-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "no-referrer"
+ }
+ ],
+ "sourceContextType": "worker-module"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for xhr to same-https origin and swap-origin redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/worker-module.http-rp/origin-when-cross-origin/fetch.http.html b/testing/web-platform/tests/referrer-policy/gen/worker-module.http-rp/origin-when-cross-origin/fetch.http.html
new file mode 100644
index 0000000000..a4b35bf505
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/worker-module.http-rp/origin-when-cross-origin/fetch.http.html
@@ -0,0 +1,275 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "worker-module"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for fetch to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "worker-module"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for fetch to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "worker-module"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for fetch to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "worker-module"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for fetch to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "worker-module"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for fetch to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "worker-module"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for fetch to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "worker-module"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for fetch to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "worker-module"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for fetch to same-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "worker-module"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for fetch to same-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "worker-module"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for fetch to same-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "worker-module"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "worker-module"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/worker-module.http-rp/origin-when-cross-origin/worker-classic.http.html b/testing/web-platform/tests/referrer-policy/gen/worker-module.http-rp/origin-when-cross-origin/worker-classic.http.html
new file mode 100644
index 0000000000..07799517d4
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/worker-module.http-rp/origin-when-cross-origin/worker-classic.http.html
@@ -0,0 +1,65 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "worker-module"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "worker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-classic to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "worker-module"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "worker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-classic to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/worker-module.http-rp/origin-when-cross-origin/worker-module.http.html b/testing/web-platform/tests/referrer-policy/gen/worker-module.http-rp/origin-when-cross-origin/worker-module.http.html
new file mode 100644
index 0000000000..95586f4f24
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/worker-module.http-rp/origin-when-cross-origin/worker-module.http.html
@@ -0,0 +1,65 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "worker-module"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "worker-module",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-module to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "worker-module"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "worker-module",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-module to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/worker-module.http-rp/origin-when-cross-origin/xhr.http.html b/testing/web-platform/tests/referrer-policy/gen/worker-module.http-rp/origin-when-cross-origin/xhr.http.html
new file mode 100644
index 0000000000..a88a479413
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/worker-module.http-rp/origin-when-cross-origin/xhr.http.html
@@ -0,0 +1,275 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "worker-module"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for xhr to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "worker-module"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for xhr to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "worker-module"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for xhr to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "worker-module"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for xhr to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "worker-module"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for xhr to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "worker-module"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for xhr to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "worker-module"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for xhr to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "worker-module"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for xhr to same-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "worker-module"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for xhr to same-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "worker-module"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for xhr to same-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "worker-module"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "worker-module"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/worker-module.http-rp/origin/fetch.http.html b/testing/web-platform/tests/referrer-policy/gen/worker-module.http-rp/origin/fetch.http.html
new file mode 100644
index 0000000000..3a28efb5d8
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/worker-module.http-rp/origin/fetch.http.html
@@ -0,0 +1,275 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "sourceContextType": "worker-module"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for fetch to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "sourceContextType": "worker-module"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for fetch to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "sourceContextType": "worker-module"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for fetch to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "sourceContextType": "worker-module"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for fetch to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "sourceContextType": "worker-module"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for fetch to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "sourceContextType": "worker-module"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for fetch to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "sourceContextType": "worker-module"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for fetch to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "sourceContextType": "worker-module"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for fetch to same-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "sourceContextType": "worker-module"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for fetch to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "sourceContextType": "worker-module"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for fetch to same-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "sourceContextType": "worker-module"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for fetch to same-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "sourceContextType": "worker-module"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for fetch to same-https origin and swap-origin redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/worker-module.http-rp/origin/worker-classic.http.html b/testing/web-platform/tests/referrer-policy/gen/worker-module.http-rp/origin/worker-classic.http.html
new file mode 100644
index 0000000000..ca9a19c13a
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/worker-module.http-rp/origin/worker-classic.http.html
@@ -0,0 +1,65 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "origin",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "sourceContextType": "worker-module"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "worker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for worker-classic to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "sourceContextType": "worker-module"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "worker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for worker-classic to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/worker-module.http-rp/origin/worker-module.http.html b/testing/web-platform/tests/referrer-policy/gen/worker-module.http-rp/origin/worker-module.http.html
new file mode 100644
index 0000000000..c213c0564b
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/worker-module.http-rp/origin/worker-module.http.html
@@ -0,0 +1,65 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "origin",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "sourceContextType": "worker-module"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "worker-module",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for worker-module to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "sourceContextType": "worker-module"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "worker-module",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for worker-module to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/worker-module.http-rp/origin/xhr.http.html b/testing/web-platform/tests/referrer-policy/gen/worker-module.http-rp/origin/xhr.http.html
new file mode 100644
index 0000000000..fce3b7be70
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/worker-module.http-rp/origin/xhr.http.html
@@ -0,0 +1,275 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "sourceContextType": "worker-module"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for xhr to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "sourceContextType": "worker-module"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for xhr to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "sourceContextType": "worker-module"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for xhr to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "sourceContextType": "worker-module"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for xhr to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "sourceContextType": "worker-module"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for xhr to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "sourceContextType": "worker-module"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for xhr to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "sourceContextType": "worker-module"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for xhr to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "sourceContextType": "worker-module"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for xhr to same-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "sourceContextType": "worker-module"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for xhr to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "sourceContextType": "worker-module"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for xhr to same-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "sourceContextType": "worker-module"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for xhr to same-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "origin"
+ }
+ ],
+ "sourceContextType": "worker-module"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for xhr to same-https origin and swap-origin redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/worker-module.http-rp/same-origin/fetch.http.html b/testing/web-platform/tests/referrer-policy/gen/worker-module.http-rp/same-origin/fetch.http.html
new file mode 100644
index 0000000000..f200e415ca
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/worker-module.http-rp/same-origin/fetch.http.html
@@ -0,0 +1,233 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "omitted",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "same-origin"
+ }
+ ],
+ "sourceContextType": "worker-module"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for fetch to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "same-origin"
+ }
+ ],
+ "sourceContextType": "worker-module"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for fetch to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "same-origin"
+ }
+ ],
+ "sourceContextType": "worker-module"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for fetch to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "same-origin"
+ }
+ ],
+ "sourceContextType": "worker-module"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for fetch to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "same-origin"
+ }
+ ],
+ "sourceContextType": "worker-module"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for fetch to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "same-origin"
+ }
+ ],
+ "sourceContextType": "worker-module"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for fetch to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "same-origin"
+ }
+ ],
+ "sourceContextType": "worker-module"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for fetch to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "same-origin"
+ }
+ ],
+ "sourceContextType": "worker-module"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for fetch to same-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "same-origin"
+ }
+ ],
+ "sourceContextType": "worker-module"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "same-origin"
+ }
+ ],
+ "sourceContextType": "worker-module"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/worker-module.http-rp/same-origin/worker-classic.http.html b/testing/web-platform/tests/referrer-policy/gen/worker-module.http-rp/same-origin/worker-classic.http.html
new file mode 100644
index 0000000000..39ce69461d
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/worker-module.http-rp/same-origin/worker-classic.http.html
@@ -0,0 +1,65 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "same-origin"
+ }
+ ],
+ "sourceContextType": "worker-module"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "worker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-classic to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "same-origin"
+ }
+ ],
+ "sourceContextType": "worker-module"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "worker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-classic to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/worker-module.http-rp/same-origin/worker-module.http.html b/testing/web-platform/tests/referrer-policy/gen/worker-module.http-rp/same-origin/worker-module.http.html
new file mode 100644
index 0000000000..55b9ee4eb2
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/worker-module.http-rp/same-origin/worker-module.http.html
@@ -0,0 +1,65 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "same-origin"
+ }
+ ],
+ "sourceContextType": "worker-module"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "worker-module",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-module to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "same-origin"
+ }
+ ],
+ "sourceContextType": "worker-module"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "worker-module",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-module to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/worker-module.http-rp/same-origin/xhr.http.html b/testing/web-platform/tests/referrer-policy/gen/worker-module.http-rp/same-origin/xhr.http.html
new file mode 100644
index 0000000000..67a1b10069
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/worker-module.http-rp/same-origin/xhr.http.html
@@ -0,0 +1,233 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "omitted",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "same-origin"
+ }
+ ],
+ "sourceContextType": "worker-module"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for xhr to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "same-origin"
+ }
+ ],
+ "sourceContextType": "worker-module"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for xhr to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "same-origin"
+ }
+ ],
+ "sourceContextType": "worker-module"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for xhr to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "same-origin"
+ }
+ ],
+ "sourceContextType": "worker-module"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for xhr to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "same-origin"
+ }
+ ],
+ "sourceContextType": "worker-module"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for xhr to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "same-origin"
+ }
+ ],
+ "sourceContextType": "worker-module"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for xhr to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "same-origin"
+ }
+ ],
+ "sourceContextType": "worker-module"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for xhr to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "omitted",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "same-origin"
+ }
+ ],
+ "sourceContextType": "worker-module"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects omitted for xhr to same-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "same-origin"
+ }
+ ],
+ "sourceContextType": "worker-module"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "same-origin"
+ }
+ ],
+ "sourceContextType": "worker-module"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/worker-module.http-rp/strict-origin-when-cross-origin/fetch.http.html b/testing/web-platform/tests/referrer-policy/gen/worker-module.http-rp/strict-origin-when-cross-origin/fetch.http.html
new file mode 100644
index 0000000000..4cc033b437
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/worker-module.http-rp/strict-origin-when-cross-origin/fetch.http.html
@@ -0,0 +1,275 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "worker-module"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for fetch to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "worker-module"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for fetch to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "worker-module"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for fetch to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "worker-module"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for fetch to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "worker-module"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for fetch to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "worker-module"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for fetch to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "worker-module"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for fetch to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "worker-module"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for fetch to same-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "worker-module"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for fetch to same-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "worker-module"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for fetch to same-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "worker-module"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "worker-module"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/worker-module.http-rp/strict-origin-when-cross-origin/worker-classic.http.html b/testing/web-platform/tests/referrer-policy/gen/worker-module.http-rp/strict-origin-when-cross-origin/worker-classic.http.html
new file mode 100644
index 0000000000..b1a4a79540
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/worker-module.http-rp/strict-origin-when-cross-origin/worker-classic.http.html
@@ -0,0 +1,65 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "worker-module"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "worker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-classic to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "worker-module"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "worker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-classic to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/worker-module.http-rp/strict-origin-when-cross-origin/worker-module.http.html b/testing/web-platform/tests/referrer-policy/gen/worker-module.http-rp/strict-origin-when-cross-origin/worker-module.http.html
new file mode 100644
index 0000000000..ba3408d98c
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/worker-module.http-rp/strict-origin-when-cross-origin/worker-module.http.html
@@ -0,0 +1,65 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "worker-module"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "worker-module",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-module to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "worker-module"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "worker-module",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-module to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/worker-module.http-rp/strict-origin-when-cross-origin/xhr.http.html b/testing/web-platform/tests/referrer-policy/gen/worker-module.http-rp/strict-origin-when-cross-origin/xhr.http.html
new file mode 100644
index 0000000000..d0ac356f06
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/worker-module.http-rp/strict-origin-when-cross-origin/xhr.http.html
@@ -0,0 +1,275 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "worker-module"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for xhr to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "worker-module"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for xhr to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "worker-module"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for xhr to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "worker-module"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for xhr to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "worker-module"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for xhr to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "worker-module"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for xhr to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "worker-module"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for xhr to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "worker-module"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for xhr to same-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "worker-module"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for xhr to same-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "worker-module"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for xhr to same-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "worker-module"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "strict-origin-when-cross-origin"
+ }
+ ],
+ "sourceContextType": "worker-module"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/worker-module.http-rp/strict-origin/fetch.http.html b/testing/web-platform/tests/referrer-policy/gen/worker-module.http-rp/strict-origin/fetch.http.html
new file mode 100644
index 0000000000..1617f51513
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/worker-module.http-rp/strict-origin/fetch.http.html
@@ -0,0 +1,275 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "sourceContextType": "worker-module"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for fetch to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "sourceContextType": "worker-module"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for fetch to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "sourceContextType": "worker-module"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for fetch to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "sourceContextType": "worker-module"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for fetch to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "sourceContextType": "worker-module"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for fetch to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "sourceContextType": "worker-module"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for fetch to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "sourceContextType": "worker-module"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for fetch to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "sourceContextType": "worker-module"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for fetch to same-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "sourceContextType": "worker-module"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for fetch to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "sourceContextType": "worker-module"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for fetch to same-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "sourceContextType": "worker-module"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for fetch to same-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "sourceContextType": "worker-module"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for fetch to same-https origin and swap-origin redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/worker-module.http-rp/strict-origin/worker-classic.http.html b/testing/web-platform/tests/referrer-policy/gen/worker-module.http-rp/strict-origin/worker-classic.http.html
new file mode 100644
index 0000000000..07d624de69
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/worker-module.http-rp/strict-origin/worker-classic.http.html
@@ -0,0 +1,65 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "origin",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "sourceContextType": "worker-module"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "worker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for worker-classic to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "sourceContextType": "worker-module"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "worker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for worker-classic to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/worker-module.http-rp/strict-origin/worker-module.http.html b/testing/web-platform/tests/referrer-policy/gen/worker-module.http-rp/strict-origin/worker-module.http.html
new file mode 100644
index 0000000000..233abfb42c
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/worker-module.http-rp/strict-origin/worker-module.http.html
@@ -0,0 +1,65 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "origin",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "sourceContextType": "worker-module"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "worker-module",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for worker-module to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "sourceContextType": "worker-module"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "worker-module",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for worker-module to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/worker-module.http-rp/strict-origin/xhr.http.html b/testing/web-platform/tests/referrer-policy/gen/worker-module.http-rp/strict-origin/xhr.http.html
new file mode 100644
index 0000000000..81ddff1eb5
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/worker-module.http-rp/strict-origin/xhr.http.html
@@ -0,0 +1,275 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "sourceContextType": "worker-module"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for xhr to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "sourceContextType": "worker-module"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for xhr to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "sourceContextType": "worker-module"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for xhr to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "sourceContextType": "worker-module"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for xhr to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "sourceContextType": "worker-module"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for xhr to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "sourceContextType": "worker-module"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for xhr to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "sourceContextType": "worker-module"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for xhr to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "sourceContextType": "worker-module"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for xhr to same-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "sourceContextType": "worker-module"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for xhr to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "sourceContextType": "worker-module"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for xhr to same-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "sourceContextType": "worker-module"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for xhr to same-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "strict-origin"
+ }
+ ],
+ "sourceContextType": "worker-module"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for xhr to same-https origin and swap-origin redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/worker-module.http-rp/unsafe-url/fetch.http.html b/testing/web-platform/tests/referrer-policy/gen/worker-module.http-rp/unsafe-url/fetch.http.html
new file mode 100644
index 0000000000..b07a1144da
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/worker-module.http-rp/unsafe-url/fetch.http.html
@@ -0,0 +1,275 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="no-referrer">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "sourceContextType": "worker-module"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "sourceContextType": "worker-module"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "sourceContextType": "worker-module"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "sourceContextType": "worker-module"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "sourceContextType": "worker-module"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "sourceContextType": "worker-module"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "sourceContextType": "worker-module"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "sourceContextType": "worker-module"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "sourceContextType": "worker-module"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "sourceContextType": "worker-module"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "sourceContextType": "worker-module"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "sourceContextType": "worker-module"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-https origin and swap-origin redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/worker-module.http-rp/unsafe-url/worker-classic.http.html b/testing/web-platform/tests/referrer-policy/gen/worker-module.http-rp/unsafe-url/worker-classic.http.html
new file mode 100644
index 0000000000..f5f0fd461b
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/worker-module.http-rp/unsafe-url/worker-classic.http.html
@@ -0,0 +1,65 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="no-referrer">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "sourceContextType": "worker-module"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "worker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-classic to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "sourceContextType": "worker-module"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "worker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-classic to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/worker-module.http-rp/unsafe-url/worker-module.http.html b/testing/web-platform/tests/referrer-policy/gen/worker-module.http-rp/unsafe-url/worker-module.http.html
new file mode 100644
index 0000000000..fc5450adc3
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/worker-module.http-rp/unsafe-url/worker-module.http.html
@@ -0,0 +1,65 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="no-referrer">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "sourceContextType": "worker-module"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "worker-module",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-module to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "sourceContextType": "worker-module"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "worker-module",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-module to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/worker-module.http-rp/unsafe-url/xhr.http.html b/testing/web-platform/tests/referrer-policy/gen/worker-module.http-rp/unsafe-url/xhr.http.html
new file mode 100644
index 0000000000..2c1f53cd9a
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/worker-module.http-rp/unsafe-url/xhr.http.html
@@ -0,0 +1,275 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="no-referrer">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "sourceContextType": "worker-module"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "sourceContextType": "worker-module"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "sourceContextType": "worker-module"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "sourceContextType": "worker-module"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "sourceContextType": "worker-module"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "sourceContextType": "worker-module"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "sourceContextType": "worker-module"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "sourceContextType": "worker-module"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "sourceContextType": "worker-module"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "sourceContextType": "worker-module"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "sourceContextType": "worker-module"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "referrerPolicy",
+ "value": "unsafe-url"
+ }
+ ],
+ "sourceContextType": "worker-module"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-https origin and swap-origin redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/worker-module.http-rp/unset/fetch.http.html b/testing/web-platform/tests/referrer-policy/gen/worker-module.http-rp/unset/fetch.http.html
new file mode 100644
index 0000000000..82d2157988
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/worker-module.http-rp/unset/fetch.http.html
@@ -0,0 +1,203 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "worker-module"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for fetch to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "worker-module"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for fetch to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "worker-module"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for fetch to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "worker-module"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for fetch to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "worker-module"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for fetch to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "worker-module"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for fetch to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "worker-module"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for fetch to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "worker-module"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for fetch to same-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "worker-module"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for fetch to same-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "worker-module"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for fetch to same-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "worker-module"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "worker-module"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/worker-module.http-rp/unset/worker-classic.http.html b/testing/web-platform/tests/referrer-policy/gen/worker-module.http-rp/unset/worker-classic.http.html
new file mode 100644
index 0000000000..896b9dce2b
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/worker-module.http-rp/unset/worker-classic.http.html
@@ -0,0 +1,53 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "worker-module"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "worker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-classic to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "worker-module"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "worker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-classic to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/worker-module.http-rp/unset/worker-module.http.html b/testing/web-platform/tests/referrer-policy/gen/worker-module.http-rp/unset/worker-module.http.html
new file mode 100644
index 0000000000..804ba16e35
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/worker-module.http-rp/unset/worker-module.http.html
@@ -0,0 +1,53 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "worker-module"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "worker-module",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-module to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "worker-module"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "worker-module",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-module to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/gen/worker-module.http-rp/unset/xhr.http.html b/testing/web-platform/tests/referrer-policy/gen/worker-module.http-rp/unset/xhr.http.html
new file mode 100644
index 0000000000..6920a3c4c3
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/gen/worker-module.http-rp/unset/xhr.http.html
@@ -0,0 +1,203 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta name="referrer" content="unsafe-url">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "worker-module"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for xhr to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "worker-module"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for xhr to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "worker-module"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for xhr to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "worker-module"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for xhr to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "worker-module"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for xhr to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "worker-module"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for xhr to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "worker-module"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for xhr to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "worker-module"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for xhr to same-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "worker-module"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for xhr to same-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "origin",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "worker-module"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects origin for xhr to same-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "worker-module"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "worker-module"
+ }
+ ],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/generic/first-meta-changed-after-second-added.http.html b/testing/web-platform/tests/referrer-policy/generic/first-meta-changed-after-second-added.http.html
new file mode 100644
index 0000000000..2ee5ade8c0
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/generic/first-meta-changed-after-second-added.http.html
@@ -0,0 +1,36 @@
+<!DOCTYPE html>
+<head>
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+
+ <meta name="referrer" content="no-referrer" id="referrermeta">
+</head>
+<body>
+ <script>
+ async function fetchAndGetReferrer() {
+ let response = await fetch('/common/security-features/subresource/xhr.py');
+ let data = await response.json();
+ return data.headers.referer;
+ }
+
+ promise_test(async t => {
+ assert_equals(await fetchAndGetReferrer(), undefined,
+ 'referrer should not be set');
+
+ // Add second meta _before_ first meta.
+ const first_meta = document.getElementById('referrermeta');
+ const second_meta = document.createElement('meta');
+ second_meta.name = 'referrer';
+ second_meta.content = 'strict-origin';
+ document.head.appendChild(second_meta);
+ assert_equals(await fetchAndGetReferrer(), window.location.origin + '/',
+ 'referrer should be origin only');
+
+ // Update content attribute of first meta.
+ first_meta.content = 'unsafe-url';
+ assert_equals(await fetchAndGetReferrer(), window.location.href,
+ 'referrer should be full url');
+ }, 'document referrer policy is the value of the most recently modified <meta name="referrer"');
+
+ </script>
+</body>
diff --git a/testing/web-platform/tests/referrer-policy/generic/iframe-src-change.html b/testing/web-platform/tests/referrer-policy/generic/iframe-src-change.html
new file mode 100644
index 0000000000..15202a76a1
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/generic/iframe-src-change.html
@@ -0,0 +1,37 @@
+<!DOCTYPE html>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<body>
+<script>
+function nextMessage() {
+ return new Promise((resolve, reject) => {
+ window.addEventListener('message', e => resolve(e.data), {once: true});
+ });
+}
+
+promise_test(async () => {
+ let iframe = document.createElement('iframe');
+ iframe.setAttribute('src', '/common/security-features/subresource/document.py?first')
+ iframe.setAttribute('referrerpolicy', 'no-referrer');
+ document.body.appendChild(iframe);
+
+ try {
+ {
+ let {referrer: documentReferrer, headers: {referer: httpReferrer}} = await nextMessage();
+ assert_equals(httpReferrer, undefined, 'expected no HTTP Referer header on initial load');
+ assert_equals(documentReferrer, undefined, 'expected no document.referrer on initial load');
+ }
+
+ iframe.setAttribute('src', '/common/security-features/subresource/document.py?second');
+
+ {
+ let {referrer: documentReferrer, headers: {referer: httpReferrer}} = await nextMessage();
+ assert_equals(httpReferrer, undefined, 'expected no HTTP Referer header on src change');
+ assert_equals(documentReferrer, undefined, 'expected no document.referrer on src change');
+ }
+ } finally {
+ iframe.remove();
+ }
+}, "Checks that referrerpolicy is respected when an iframe's src changes.");
+</script>
+</body>
diff --git a/testing/web-platform/tests/referrer-policy/generic/iframe-upgrade-request-to-cross-origin.sub.html b/testing/web-platform/tests/referrer-policy/generic/iframe-upgrade-request-to-cross-origin.sub.html
new file mode 100644
index 0000000000..4040072ab9
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/generic/iframe-upgrade-request-to-cross-origin.sub.html
@@ -0,0 +1,26 @@
+<!DOCTYPE html>
+<link rel="author" title="Dominic Farolino" href="dom@chromium.org">
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<!-- We need to set the CSP via the <meta> tag. If we were to use the HTTP
+ header, we'd have to specify the absolute HTTPS URL of the test harness and
+ reporter, but then this file is not recognized as a test harness test, and
+ will not run -->
+<meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests">
+<body>
+<iframe id="iframe"></iframe>
+<script>
+async_test(t => {
+ const iframe = document.querySelector('iframe');
+ iframe.src =
+ 'http://{{domains[www]}}:{{ports[https][0]}}/referrer-policy/generic/resources/referrer.py';
+
+ addEventListener('message', t.step_func_done(msg => {
+ const referrer = msg.data;
+ assert_equals(referrer, new URL(location.href).origin + '/',
+ "The referrer header sent for the iframe request should be redacted");
+ }));
+}, "If an insecure iframe request is upgraded to https to be cross-origin, " +
+ "referrer policies that consider same-origin-ness should be applied correctly");
+</script>
+</body>
diff --git a/testing/web-platform/tests/referrer-policy/generic/iframe-upgrade-request-to-cross-origin.sub.html.headers b/testing/web-platform/tests/referrer-policy/generic/iframe-upgrade-request-to-cross-origin.sub.html.headers
new file mode 100644
index 0000000000..ad768e6329
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/generic/iframe-upgrade-request-to-cross-origin.sub.html.headers
@@ -0,0 +1 @@
+Referrer-Policy: origin-when-cross-origin
diff --git a/testing/web-platform/tests/referrer-policy/generic/iframe-upgrade-request-to-same-origin.sub.https.html b/testing/web-platform/tests/referrer-policy/generic/iframe-upgrade-request-to-same-origin.sub.https.html
new file mode 100644
index 0000000000..f9163bec54
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/generic/iframe-upgrade-request-to-same-origin.sub.https.html
@@ -0,0 +1,21 @@
+<!DOCTYPE html>
+<link rel="author" title="Dominic Farolino" href="dom@chromium.org">
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<body>
+<iframe id="iframe"></iframe>
+<script>
+async_test(t => {
+ const iframe = document.querySelector('iframe');
+ const insecure_origin = new URL(location.href).origin.replace("https", "http");
+ iframe.src = insecure_origin + '/referrer-policy/generic/resources/referrer.py';
+
+ addEventListener('message', t.step_func_done(msg => {
+ const referrer = msg.data;
+ assert_equals(referrer, location.href,
+ "The referrer header sent for the iframe request should not be redacted");
+ }));
+}, "If an insecure iframe request is upgraded to https to be same-origin, " +
+ "referrer policies that consider same-origin-ness should be applied correctly");
+</script>
+</body>
diff --git a/testing/web-platform/tests/referrer-policy/generic/iframe-upgrade-request-to-same-origin.sub.https.html.headers b/testing/web-platform/tests/referrer-policy/generic/iframe-upgrade-request-to-same-origin.sub.https.html.headers
new file mode 100644
index 0000000000..fd9ee0f032
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/generic/iframe-upgrade-request-to-same-origin.sub.https.html.headers
@@ -0,0 +1,2 @@
+Content-Security-Policy: upgrade-insecure-requests
+Referrer-Policy: origin-when-cross-origin
diff --git a/testing/web-platform/tests/referrer-policy/generic/inheritance/iframe-inheritance-about-blank.html b/testing/web-platform/tests/referrer-policy/generic/inheritance/iframe-inheritance-about-blank.html
new file mode 100644
index 0000000000..fc7d39a4cf
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/generic/inheritance/iframe-inheritance-about-blank.html
@@ -0,0 +1,107 @@
+<!doctype html>
+<meta charset="utf-8">
+<title>Referrer Policy: iframe src="about:blank"</title>
+<link rel="author" title="Hiroshige Hayashizaki" href="mailto:hiroshige@chromium.org">
+<link rel="author" title="Dom Farolino" href="mailto:dom@chromium.org">
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<meta name="referrer" content="origin">
+<body>
+<script>
+const testFetchClientReferrer =
+ async_test("The fetch() API in an about:blank iframe with the 'client' " +
+ "referrer is fetched with no 'Referer' header");
+const testFetchURLReferrer =
+ async_test("The fetch() API in an about:blank iframe with a custom URL " +
+ "referrer is fetched with a 'Referer` header that uses the " +
+ "outer document's URL along with its referrer policy");
+const testDocumentReferrer =
+ async_test("The value of document.referrer in an about:blank iframe is the " +
+ "outer document's full URL, regardless of referrer policy");
+const testSubresource =
+ async_test("A subresource fetched from an about:blank iframe is fetched " +
+ "with no 'Referer' header");
+
+window.addEventListener("message", msg => {
+ const test_name = msg.data.test;
+ const referrer = msg.data.referrer;
+ if (test_name === "testFetchClientReferrer") {
+ testFetchClientReferrer.step_func_done(() => {
+ // Because the URL of the Document of <iframe src="about:blank"> is
+ // "about:blank", the stripped URL is no referrer:
+ // https://w3c.github.io/webappsec-referrer-policy/#strip-url.
+ assert_equals(referrer, undefined);
+ })();
+ } else if (test_name === "testFetchURLReferrer") {
+ // <iframe src="about:blank"> inherits its parent's referrer policy.
+ // Note: Setting an explicit URL as referrer succeeds
+ // because the same-origin check at
+ // https://fetch.spec.whatwg.org/#dom-request
+ // is done against <iframe>'s origin, which inherits the parent
+ // Document's origin == location.orgin. Furthermore, since the iframe
+ // inherits its parent's referrer policy, the URL should be restricted to
+ // its origin.
+ testFetchURLReferrer.step_func_done(() => {
+ assert_equals(referrer, location.origin + '/');
+ })();
+ } else if (test_name === "testDocumentReferrer") {
+ // The referrer of the initial document in an about:blank iframe is set to
+ // its creating document's URL, unredacted by a referrer policy, as per step
+ // 13 of:
+ // https://html.spec.whatwg.org/multipage/browsers.html#creating-a-new-browsing-context.
+ testDocumentReferrer.step_func_done(() => {
+ assert_equals(referrer, location.href);
+ })();
+ } else if (test_name === "testSubresource") {
+ // Because the URL of the Document of <iframe src="about:blank"> is
+ // "about:blank", the stripped URL is no referrer:
+ // https://w3c.github.io/webappsec-referrer-policy/#strip-url.
+ testSubresource.step_func_done(() => {
+ assert_equals(referrer, "");
+ })();
+ }
+});
+
+const iframe = document.createElement("iframe");
+
+iframe.addEventListener("load", function() {
+ const iframe_script = iframe.contentDocument.createElement('script');
+ iframe_script.textContent = `
+ // Test fetch() API with default "client" referrer.
+ fetch("${location.origin}/common/security-features/subresource/xhr.py?name=testFetchClientReferrer")
+ .then(r => r.json())
+ .then(j => {
+ top.postMessage({test: "testFetchClientReferrer", referrer: j.headers.referer}, "*")
+ }).catch(e => {
+ top.postMessage({test: "testFetchClientReferrer", referrer: "FAILURE"}, "*");
+ });
+
+ // Test fetch() API with custom URL referrer.
+ fetch("${location.origin}/common/security-features/subresource/xhr.py?name=URL",
+ {referrer: "${location.href}/custom"})
+ .then(r => r.json())
+ .then(j => {
+ top.postMessage({test: "testFetchURLReferrer", referrer: j.headers.referer}, "*")
+ }).catch(e => {
+ top.postMessage({test: "testFetchURLReferrer", referrer: "FAILURE"}, "*");
+ });
+
+ // Test document.referrer.
+ top.postMessage({test: "testDocumentReferrer", referrer: document.referrer}, "*");
+
+ // Test a subresource being fetched by the iframe.
+ const subresource_script = document.createElement('script');
+ subresource_script.src = "${location.origin}/common/security-features/subresource/referrer.py";
+ subresource_script.onload = e => {
+ top.postMessage({test: "testSubresource", referrer: window.referrer}, "*");
+ }
+ subresource_script.onerror = function(e) {
+ top.postMessage({test: "testSubresource", referrer: "FAILURE"}, "*");
+ };
+ document.head.appendChild(subresource_script);
+ `;
+ iframe.contentDocument.body.appendChild(iframe_script);
+});
+
+document.body.appendChild(iframe);
+</script>
diff --git a/testing/web-platform/tests/referrer-policy/generic/inheritance/iframe-inheritance-data.html b/testing/web-platform/tests/referrer-policy/generic/inheritance/iframe-inheritance-data.html
new file mode 100644
index 0000000000..1d39781e30
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/generic/inheritance/iframe-inheritance-data.html
@@ -0,0 +1,27 @@
+<html>
+ <head>
+ <title>Referrer Policy: iframes with data url uses no referrer</title>
+ <link rel="help" href="https://www.w3.org/TR/referrer-policy/#referrer-policy-delivery-nested">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/get-host-info.sub.js"></script>
+ <script src="resources/make-html-script.js"></script>
+ <meta name="referrer" content="origin">
+ </head>
+ <body onload="runTest()">
+ <h1>Referrer Policy: iframes with data url uses no referrer</h1>
+ <script>
+ let test = async_test("iframes with data url uses no referrer");
+ window.addEventListener("message", test.step_func_done(msg => {
+ assert_equals(msg.data.referrer, undefined);
+ }));
+
+ function runTest() {
+ let iframe = document.createElement("iframe");
+ iframe.src = `data:text/html,${createScriptString(get_host_info().REMOTE_ORIGIN)}`;
+ document.body.appendChild(iframe);
+ }
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/generic/inheritance/iframe-inheritance-document-write.html b/testing/web-platform/tests/referrer-policy/generic/inheritance/iframe-inheritance-document-write.html
new file mode 100644
index 0000000000..c88586aaf6
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/generic/inheritance/iframe-inheritance-document-write.html
@@ -0,0 +1,34 @@
+<!doctype html>
+<title>Referrer Policy: iframes with document.write()</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/common/get-host-info.sub.js"></script>
+<script src="resources/make-html-script.js"></script>
+<meta name="referrer" content="origin">
+<div id="log"></div>
+<script>
+ let reportedReferrer = () => {
+ return new Promise(resolve => {
+ window.addEventListener("message", msg => resolve(msg.data.referrer));
+ });
+ };
+
+ const iframe = document.createElement("iframe");
+ promise_test(async t => {
+ let referrer_of_srcdoc_iframe = reportedReferrer();
+ const script_to_fetch_cross_origin_resource =
+ createScriptString(get_host_info().REMOTE_ORIGIN, location.origin + "/custom");
+ iframe.srcdoc = `<head><meta name="referrer" content="unsafe-url"></head>`
+ + script_to_fetch_cross_origin_resource;
+ document.body.appendChild(iframe);
+ assert_equals(await referrer_of_srcdoc_iframe, self.origin + "/custom",
+ "Srcdoc iframe setting referrer policy via meta header should use that referrer policy.");
+
+ let referrer_after_document_open = reportedReferrer();
+ iframe.contentDocument.open();
+ iframe.contentDocument.write(script_to_fetch_cross_origin_resource);
+ iframe.contentDocument.close();
+ assert_equals(await referrer_after_document_open, self.origin + "/custom",
+ "Referrer policy should not change after document.open().");
+ }, "document.open() should not change the referrer policy of the opened document.");
+</script>
diff --git a/testing/web-platform/tests/referrer-policy/generic/inheritance/iframe-inheritance-history-about-blank.html b/testing/web-platform/tests/referrer-policy/generic/inheritance/iframe-inheritance-history-about-blank.html
new file mode 100644
index 0000000000..8d68ffb5ff
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/generic/inheritance/iframe-inheritance-history-about-blank.html
@@ -0,0 +1,80 @@
+<!doctype html>
+<title>Referrer Policy: navigating back to an about:blank iframe reuses the original referrer policy</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<meta name="referrer" content="no-referrer">
+<div id="log"></div>
+<script>
+ let checkReferrer = document => {
+ let script = document.createElement('script');
+ script.innerText = `
+ fetch("${origin}/common/security-features/subresource/xhr.py",
+ {referrer: "${location.origin}/custom"})
+ .then(r => r.json())
+ .then(j => {
+ top.postMessage({referrer: j.headers.referer}, "*")
+ }).catch(e => {
+ top.postMessage({referrer: "FAILURE"}, "*");
+ });
+ `
+
+ let referrer = new Promise(resolve => {
+ window.addEventListener("message", function listener(msg) {
+ window.removeEventListener("message", listener, false);
+ resolve(msg.data.referrer);
+ });
+ });
+
+ document.body.appendChild(script);
+
+ return referrer;
+ };
+
+ let iframeLoaded = iframe => {
+ return new Promise(resolve => {
+ iframe.onload = resolve;
+ });
+ };
+
+ promise_test(async t => {
+ // 1. Create an iframe and navigate it to about:blank.
+ // (We cannot just create an empty iframe since the initial empty
+ // document will get its history entry replaced, so we cannot
+ // navigate back to it.)
+ const iframe = document.createElement("iframe");
+ iframe.name = 'test_frame';
+ iframe.src = "/referrer-policy";
+ document.body.appendChild(iframe);
+ await iframeLoaded(iframe);
+
+ window.open('about:blank', 'test_frame');
+ await iframeLoaded(iframe);
+ let referrer_1 = await checkReferrer(iframe.contentDocument);
+ assert_equals(referrer_1, undefined,
+ "First navigation uses correct policy.");
+
+ // 2. Change the referrer policy of the iframe.
+ let meta = iframe.contentDocument.createElement('meta');
+ meta.name = 'referrer';
+ meta.content = "unsafe-url";
+ iframe.contentDocument.head.appendChild(meta);
+
+ let referrer_2 = await checkReferrer(iframe.contentDocument);
+ assert_equals(referrer_2, location.origin + '/custom',
+ "Referrer policy correctly changed.");
+
+ // 3. Navigate the iframe elsewhere.
+ window.open('/referrer-policy', 'test_frame');
+ await iframeLoaded(iframe);
+
+ // 4. Navigate the iframe back.
+ iframe.contentWindow.history.back();
+ await iframeLoaded(iframe);
+
+ let referrer_3 = await checkReferrer(iframe.contentDocument);
+ assert_equals(referrer_3, undefined,
+ "History navigation reuses original policy.");
+ document.body.removeChild(iframe);
+ }, "History navigation reuses original policy.");
+
+</script>
diff --git a/testing/web-platform/tests/referrer-policy/generic/inheritance/iframe-inheritance-history-about-srcdoc.html b/testing/web-platform/tests/referrer-policy/generic/inheritance/iframe-inheritance-history-about-srcdoc.html
new file mode 100644
index 0000000000..91ac5fc139
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/generic/inheritance/iframe-inheritance-history-about-srcdoc.html
@@ -0,0 +1,73 @@
+<!doctype html>
+<title>Referrer Policy: navigating back to an about:srcdoc iframe reuses the original referrer policy</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/common/get-host-info.sub.js"></script>
+<script src="resources/make-html-script.js"></script>
+<meta name="referrer" content="no-referrer">
+<div id="log"></div>
+<script>
+ let reportedReferrer = () => {
+ return new Promise(resolve => {
+ window.addEventListener("message", function listener(msg) {
+ window.removeEventListener("message", listener, false);
+ resolve(msg.data.referrer);
+ });
+ });
+ };
+
+ let iframeLoaded = iframe => {
+ return new Promise(resolve => {
+ iframe.onload = resolve;
+ });
+ };
+
+ promise_test(async t => {
+ // 1. Create an about:srcdoc iframe.
+ const iframe = document.createElement("iframe");
+ iframe.name = 'test_frame';
+ let iframe_load_1 = iframeLoaded(iframe);
+ let referrer_1 = reportedReferrer();
+ iframe.srcdoc = createScriptString(get_host_info().REMOTE_ORIGIN,
+ location.origin + "/custom");
+ document.body.appendChild(iframe);
+ await iframe_load_1;
+ let referrer_1_result = await referrer_1;
+
+ // 2. Change the referrer policy of the main document.
+ document.getElementsByTagName('meta')[0].content = "unsafe-url";
+
+ // 3. Navigate the iframe elsewhere.
+ let iframe_load_2 = iframeLoaded(iframe);
+ window.open('/referrer-policy', 'test_frame');
+ await iframe_load_2;
+
+ // 4. Navigate the iframe back.
+ let iframe_load_3 = iframeLoaded(iframe);
+ let referrer_2 = reportedReferrer();
+ iframe.contentWindow.history.back();
+ await iframe_load_3;
+
+ // Despite the main document has changed its referrer policy in (2), the
+ // reported referrer for the history navigation to about:srcdoc in (4) must
+ // match with the one originally reported in (1).
+ assert_equals(referrer_1_result, undefined,
+ "First navigation uses correct policy.");
+ assert_equals(await referrer_2, undefined,
+ "History navigation reuses original policy.");
+ }, "History navigation reuses original policy.");
+
+ promise_test(async t => {
+ // If we initiate a new about:srcdoc navigation, the new referrer policy
+ // should apply.
+ const new_iframe = document.createElement("iframe");
+ let new_iframe_load = iframeLoaded(new_iframe);
+ let new_iframe_referrer = reportedReferrer();
+ new_iframe.srcdoc = createScriptString(get_host_info().REMOTE_ORIGIN,
+ location.origin + "/custom");
+ document.body.appendChild(new_iframe);
+ await new_iframe_load;
+
+ assert_equals(await new_iframe_referrer, self.origin + '/custom');
+ }, "New srcdoc iframe uses new policy.");
+</script>
diff --git a/testing/web-platform/tests/referrer-policy/generic/inheritance/iframe-inheritance-javascript-child.html b/testing/web-platform/tests/referrer-policy/generic/inheritance/iframe-inheritance-javascript-child.html
new file mode 100644
index 0000000000..491f104de4
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/generic/inheritance/iframe-inheritance-javascript-child.html
@@ -0,0 +1,77 @@
+<!doctype html>
+<title>Referrer Policy: iframes with javascript url reuse referrer policy</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/common/get-host-info.sub.js"></script>
+<script src="resources/make-html-script.js"></script>
+<meta name="referrer" content="unsafe-url">
+<div id="log"></div>
+<script>
+[
+ {
+ srcDocPolicy: ``,
+ expected: location.origin + "/custom"
+ },
+ {
+ srcDocPolicy: `<meta name="referrer" content="no-referrer">`,
+ expected: undefined
+ }
+].forEach(({ srcDocPolicy, expected }) => {
+ promise_test(t => {
+ return new Promise(resolve => {
+ window.addEventListener("message", t.step_func(msg => {
+ assert_equals(msg.data.referrer, expected);
+ resolve();
+ }), { once:true });
+
+ const iframe = document.createElement("iframe");
+ t.add_cleanup(() => iframe.remove());
+ iframe.srcdoc = `${srcDocPolicy}<body><h1>Outer iframe</h1></body>`;
+ iframe.onload = t.step_func(() => {
+ iframe.onload = null;
+ const iframeChild = iframe.contentDocument.createElement("iframe");
+ // We add a custom referrer to the fetch request. Otherwise,
+ // since the frame's URL is "about:blank", the Referer header will
+ // always be empty:
+ // https://w3c.github.io/webappsec-referrer-policy/#strip-url.
+ iframeChild.src = `javascript:'${createScriptString(get_host_info().REMOTE_ORIGIN, location.origin+"/custom")}'`;
+ iframe.contentDocument.body.appendChild(iframeChild);
+ });
+ document.body.appendChild(iframe);
+ });
+ });
+});
+
+[
+ {
+ srcDocPolicy: ``,
+ expected: location.href // Executing javascript does not change the document url.
+ // Since the algorithm for computing the referrer in a srcdoc
+ // iframe defers recursively to the parent, the expected
+ // referrer should be the full url of the main document.
+ },
+ {
+ srcDocPolicy: `<meta name="referrer" content="no-referrer">`,
+ expected: undefined
+ }
+].forEach(({ srcDocPolicy, expected }) => {
+ promise_test(t => {
+ return new Promise(resolve => {
+ window.addEventListener("message", t.step_func(msg => {
+ assert_equals(msg.data.referrer, expected);
+ resolve();
+ }), { once:true });
+
+ const iframe = document.createElement("iframe");
+ t.add_cleanup(() => iframe.remove());
+ iframe.srcdoc = `${srcDocPolicy}<body><h1>Outer iframe</h1></body>`;
+ iframe.onload = t.step_func(() => {
+ iframe.onload = null;
+ iframe.contentWindow.location = `javascript:'${createScriptString(get_host_info().REMOTE_ORIGIN)}'`;
+ });
+ document.body.appendChild(iframe);
+ });
+ });
+});
+
+</script>
diff --git a/testing/web-platform/tests/referrer-policy/generic/inheritance/iframe-inheritance-javascript.html b/testing/web-platform/tests/referrer-policy/generic/inheritance/iframe-inheritance-javascript.html
new file mode 100644
index 0000000000..cf1f099c63
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/generic/inheritance/iframe-inheritance-javascript.html
@@ -0,0 +1,45 @@
+<!doctype html>
+<title>Referrer Policy: iframes with javascript url reuse referrer policy</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/common/get-host-info.sub.js"></script>
+<script src="resources/make-html-script.js"></script>
+<meta name="referrer" content="unsafe-url">
+<div id="log"></div>
+<script>
+
+[
+ {
+ fetchReferrer: "",
+ // Because the URL of the Document of <iframe src="javascript:..."> is
+ // "about:blank", the stripped URL is no referrer:
+ // https://w3c.github.io/webappsec-referrer-policy/#strip-url.
+ expected: undefined
+ },
+ {
+ fetchReferrer: location.origin+"/custom",
+ // <iframe src="javascript:..."> inherits its parent's referrer policy.
+ // Note: Setting an explicit URL as referrer succeeds
+ // because the same-origin check at
+ // https://fetch.spec.whatwg.org/#dom-request
+ // is done against <iframe>'s origin, which inherits the parent
+ // Document's origin == location.orgin. Furthermore, since the iframe
+ // inherits its parent's referrer policy, the URL should be restricted to
+ // its origin.
+ expected: self.origin + "/custom"
+ }
+].forEach(({ fetchReferrer, expected }) => {
+ promise_test(t => {
+ return new Promise(resolve => {
+ window.addEventListener("message", t.step_func(msg => {
+ assert_equals(msg.data.referrer, expected);
+ resolve();
+ }), { once: true });
+ const iframe = document.createElement("iframe");
+ iframe.src = `javascript:'${createScriptString(get_host_info().REMOTE_ORIGIN, fetchReferrer)}'`;
+ document.body.appendChild(iframe);
+ });
+ });
+});
+
+</script>
diff --git a/testing/web-platform/tests/referrer-policy/generic/inheritance/iframe-inheritance-srcdoc-child.html b/testing/web-platform/tests/referrer-policy/generic/inheritance/iframe-inheritance-srcdoc-child.html
new file mode 100644
index 0000000000..cd4b4ae724
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/generic/inheritance/iframe-inheritance-srcdoc-child.html
@@ -0,0 +1,34 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <title>Referrer Policy: iframes srdoc child correctly inherit the ancestor's referrer policy</title>
+ <link rel="help" href="https://www.w3.org/TR/referrer-policy/#referrer-policy-delivery-nested">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/get-host-info.sub.js"></script>
+ <script src="resources/make-html-script.js"></script>
+ <meta name="referrer" content="origin">
+ </head>
+ <body onload="runTest()">
+ <h1>Referrer Policy: iframes srcdoc child correctly inherit the ancestor's referrer policy</h1>
+ <script>
+ var test = async_test("iframes srcdoc child correctly inherit the ancestor's referrer policy");
+ window.addEventListener("message", test.step_func_done(msg => {
+ assert_equals(msg.data.referrer, self.origin + "/");
+ }));
+
+ function runTest() {
+ var iframe = document.createElement("iframe");
+ iframe.srcdoc = `<body><h1>Outer iframe</h1></body>`;
+ iframe.onload = test.step_func(() => {
+ iframe.onload = null;
+ var iframeChild = iframe.contentDocument.createElement("iframe");
+ iframeChild.srcdoc = createScriptString(get_host_info().REMOTE_ORIGIN);
+ iframe.contentDocument.body.appendChild(iframeChild);
+ });
+ document.body.appendChild(iframe);
+ }
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/generic/inheritance/iframe-inheritance-srcdoc.html b/testing/web-platform/tests/referrer-policy/generic/inheritance/iframe-inheritance-srcdoc.html
new file mode 100644
index 0000000000..6904374b63
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/generic/inheritance/iframe-inheritance-srcdoc.html
@@ -0,0 +1,45 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <title>Referrer Policy: iframes srdoc correctly inherit the ancestor's referrer policy</title>
+ <link rel="help" href="https://www.w3.org/TR/referrer-policy/#referrer-policy-delivery-nested">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/get-host-info.sub.js"></script>
+ <script src="resources/make-html-script.js"></script>
+ <meta name="referrer" content="origin">
+ </head>
+ <body>
+ <h1>Referrer Policy: iframes srcdoc correctly inherit the ancestor's referrer policy</h1>
+ <script>
+ let reportedReferrer = () => {
+ return new Promise(resolve => {
+ window.addEventListener("message", msg => resolve(msg.data.referrer));
+ });
+ };
+
+ const iframe = document.createElement("iframe");
+
+ promise_test(async t => {
+ let referrer = reportedReferrer();
+ iframe.srcdoc = createScriptString(get_host_info().REMOTE_ORIGIN,
+ location.origin + "/custom");
+ document.body.appendChild(iframe);
+ assert_equals(await referrer, self.origin + "/",
+ "Referrer policy should be inherited from parent.");
+
+ let meta = document.createElement('meta');
+ meta.name = "referrer";
+ meta.content = "unsafe-url";
+ document.head.appendChild(meta);
+ iframe.contentWindow.postMessage('checkReferrer');
+ assert_equals(
+ await reportedReferrer(), self.origin + "/",
+ "Changing parent's referrer policy has no effect on the child.");
+
+ }, "Srcdoc iframe inherits referrer policy from parent on creation.");
+
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/generic/inheritance/popup-inheritance-about-blank.html b/testing/web-platform/tests/referrer-policy/generic/inheritance/popup-inheritance-about-blank.html
new file mode 100644
index 0000000000..c8e9a9c012
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/generic/inheritance/popup-inheritance-about-blank.html
@@ -0,0 +1,105 @@
+<!doctype html>
+<meta charset="utf-8">
+<title>Referrer Policy: popup src="about:blank"</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<meta name="referrer" content="origin">
+<body>
+<script>
+const testFetchClientReferrer =
+ async_test("The fetch() API in an about:blank popup with the 'client' " +
+ "referrer is fetched with no 'Referer' header");
+const testFetchURLReferrer =
+ async_test("The fetch() API in an about:blank popup with a custom URL " +
+ "referrer is fetched with a 'Referer` header that uses the " +
+ "outer document's URL along with its referrer policy");
+const testDocumentReferrer =
+ async_test("The value of document.referrer in an about:blank popup is the " +
+ "outer document's full URL, regardless of referrer policy");
+const testSubresource =
+ async_test("A subresource fetched from an about:blank popup is fetched " +
+ "with no 'Referer' header");
+
+window.addEventListener("message", msg => {
+ const test_name = msg.data.test;
+ const referrer = msg.data.referrer;
+ if (test_name === "testFetchClientReferrer") {
+ // Because the URL of the document of the popup opened through
+ // `window.open()` is "about:blank", the stripped URL is no referrer:
+ // https://w3c.github.io/webappsec-referrer-policy/#strip-url.
+ testFetchClientReferrer.step_func_done(() => {
+ assert_equals(referrer, undefined);
+ })();
+ } else if (test_name === "testFetchURLReferrer") {
+ // The "about:blank" popup inherits its opener's referrer policy.
+ // Note: Setting an explicit URL as referrer is allowed per spec because the
+ // same-origin check at https://fetch.spec.whatwg.org/#dom-request is done
+ // against the popup's origin, which inherits the opener document's origin.
+ testFetchURLReferrer.step_func_done(() => {
+ assert_equals(referrer, location.origin + '/');
+ })();
+ } else if (test_name === "testDocumentReferrer") {
+ // The referrer of the initial document in an about:blank popup is set to
+ // its creating document's URL, unredacted by a referrer policy, as per step
+ // 17 of:
+ // https://html.spec.whatwg.org/multipage/browsers.html#creating-a-new-browsing-context.
+ testDocumentReferrer.step_func_done(() => {
+ assert_equals(referrer, location.href);
+ })();
+ } else if (test_name === "testSubresource") {
+ // Because the URL of the document of the popup is "about:blank", the
+ // stripped URL is no referrer:
+ // https://w3c.github.io/webappsec-referrer-policy/#strip-url.
+ //
+ // Note: this test is essentially the same as "testFetchClientReferrer" (the
+ // only difference is that the fetch is not initiated by javascript).
+ // Compared to the other test, we expect the empty string here instead of
+ // `undefined` just because of a testing quirk.
+ testSubresource.step_func_done(() => {
+ assert_equals(referrer, "");
+ })();
+ }
+});
+
+const popup = window.open();
+const script = popup.document.createElement('script');
+
+script.textContent = `
+ // Test fetch() API with default "client" referrer.
+ fetch("${location.origin}/common/security-features/subresource/xhr.py?name=testFetchClientReferrer")
+ .then(r => r.json())
+ .then(j => {
+ opener.postMessage({test: "testFetchClientReferrer", referrer: j.headers.referer}, "*")
+ }).catch(e => {
+ opener.postMessage({test: "testFetchClientReferrer", referrer: "FAILURE"}, "*");
+ });
+
+ // Test fetch() API with custom URL referrer.
+ fetch("${location.origin}/common/security-features/subresource/xhr.py?name=URL",
+ {referrer: "${location.href}/custom"})
+ .then(r => r.json())
+ .then(j => {
+ opener.postMessage({test: "testFetchURLReferrer", referrer: j.headers.referer}, "*")
+ }).catch(e => {
+ opener.postMessage({test: "testFetchURLReferrer", referrer: "FAILURE"}, "*");
+ });
+
+ // Test document.referrer.
+ opener.postMessage({test: "testDocumentReferrer", referrer: document.referrer}, "*");
+
+ // Test a subresource being fetched by the popup.
+ // This is practicallty the same as the first test: the only difference is
+ // that here the fetch is not triggered by a javascript fetch function but by
+ // a script element with a src tag embedded in the html source.
+ const subresource_script = document.createElement('script');
+ subresource_script.src = "${location.origin}/common/security-features/subresource/referrer.py";
+ subresource_script.onload = e => {
+ opener.postMessage({test: "testSubresource", referrer: window.referrer}, "*");
+ }
+ subresource_script.onerror = function(e) {
+ opener.postMessage({test: "testSubresource", referrer: "FAILURE"}, "*");
+ };
+ document.head.appendChild(subresource_script);
+`;
+popup.document.body.appendChild(script);
+</script>
diff --git a/testing/web-platform/tests/referrer-policy/generic/inheritance/popup-inheritance-form-submission.html b/testing/web-platform/tests/referrer-policy/generic/inheritance/popup-inheritance-form-submission.html
new file mode 100644
index 0000000000..2c03792a07
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/generic/inheritance/popup-inheritance-form-submission.html
@@ -0,0 +1,30 @@
+<!doctype html>
+<meta charset="utf-8">
+<title>Referrer Policy: popup src="about:blank"</title>
+<link rel="help" href="https://bugs.chromium.org/p/chromium/issues/detail?id=1370425">
+<link rel="help" href="https://html.spec.whatwg.org/#creating-a-new-browsing-context">
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<body>
+
+<iframe src="resources/submit-form-and-remove-frame.html"></iframe>
+<script>
+async_test(t => {
+ // Called by the child frame once it has submitted its form that creates a new
+ // `about:blank` window in our browsing context group (therefore, the window
+ // is reachable by us).
+ window.removeIframe = t.step_func(() => {
+ const iframe = document.querySelector('iframe');
+ const expected_referrer = iframe.contentWindow.location.href;
+ iframe.remove();
+
+ // The child frame is removed, but its form submission navigation is still
+ // queued on the opened window's global. Wait until it is run and then
+ // evaluate script.
+ t.step_timeout(t.step_func_done(() => {
+ const window_opened_from_form = window.open("", "does-not-exist");
+ assert_equals(document.referrer, expected_referrer);
+ }));
+ });
+}, "A new frame's document.referrer is correct even if its initiator frame is gone");
+</script>
diff --git a/testing/web-platform/tests/referrer-policy/generic/inheritance/resources/make-html-script.js b/testing/web-platform/tests/referrer-policy/generic/inheritance/resources/make-html-script.js
new file mode 100644
index 0000000000..6c2c145c4e
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/generic/inheritance/resources/make-html-script.js
@@ -0,0 +1,19 @@
+function createScriptString(origin, referrer) {
+ let request_init = referrer ? `{referrer: "${referrer}"}` : "";
+ return `<script>
+ function checkReferrer() {
+ fetch("${origin}/common/security-features/subresource/xhr.py",
+ ${request_init})
+ .then(r => r.json())
+ .then(j => {
+ top.postMessage({referrer: j.headers.referer}, "*")
+ }).catch(e => {
+ top.postMessage({referrer: "FAILURE"}, "*");
+ });
+ }
+ checkReferrer();
+ window.addEventListener("message", msg => {
+ if (msg.data === "checkReferrer") checkReferrer();
+ });
+ <\/script>`;
+}
diff --git a/testing/web-platform/tests/referrer-policy/generic/inheritance/resources/submit-form-and-remove-frame.html b/testing/web-platform/tests/referrer-policy/generic/inheritance/resources/submit-form-and-remove-frame.html
new file mode 100644
index 0000000000..bf5ede96d9
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/generic/inheritance/resources/submit-form-and-remove-frame.html
@@ -0,0 +1,10 @@
+<!doctype html>
+<meta name='referrer' content='no-referrer'>
+<body onload='start()'>
+<script>
+ function start() {
+ myform.submit();
+ parent.removeIframe();
+ }
+</script>
+<form id='myform' action='about:blank' target='does-not-exist'>
diff --git a/testing/web-platform/tests/referrer-policy/generic/inheritance/workers.html b/testing/web-platform/tests/referrer-policy/generic/inheritance/workers.html
new file mode 100644
index 0000000000..0bd75a1d15
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/generic/inheritance/workers.html
@@ -0,0 +1,47 @@
+<html>
+ <head>
+ <title>Referrer Policy: local scheme workers inherit from creator</title>
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/get-host-info.sub.js"></script>
+ <meta name="referrer" content="no-referrer">
+ </head>
+ <script>
+ let cross_origin = get_host_info().REMOTE_ORIGIN;
+
+ let generateFetchString = postmessage => `
+ fetch("${cross_origin}/common/security-features/subresource/xhr.py",
+ {referrer: "${location.href}/custom"})
+ .then(r => r.json())
+ .then(j => ${postmessage}({referrer: j.headers.referer}))
+ .catch(e => ${postmessage}({referrer: "FAILURE"}));`
+
+ async_test(t => {
+ let blob = new Blob([generateFetchString("postMessage")],
+ {type : 'application/javascript'});
+ let blob_url = URL.createObjectURL(blob);
+ let worker = new Worker(blob_url);
+ worker.onmessage = t.step_func_done(msg => {
+ assert_equals(msg.data.referrer, undefined);
+ });
+ }, "Dedicated worker with local scheme inherits referrer policy " +
+ "from the creating document.");
+
+ async_test(t => {
+ let script = `
+ onconnect = e => {
+ let port = e.ports[0];
+ port.start();
+ ${generateFetchString("port.postMessage")}
+ };`
+ let blob = new Blob([script], {type : 'application/javascript'});
+ let blob_url = URL.createObjectURL(blob);
+ let shared_worker = new SharedWorker(blob_url);
+ shared_worker.port.start();
+ shared_worker.port.onmessage = t.step_func_done(msg => {
+ assert_equals(msg.data.referrer, undefined);
+ });
+ }, "Shared worker with local scheme inherits referrer policy " +
+ "from the creating document.");
+ </script>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/generic/link-rel-prefetch.html b/testing/web-platform/tests/referrer-policy/generic/link-rel-prefetch.html
new file mode 100644
index 0000000000..72e831c921
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/generic/link-rel-prefetch.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <title>Referrer policies for resources loaded via link rel prefetch</title>
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <!-- Common global functions for referrer-policy tests. -->
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <meta name="referrer" content="origin">
+ <link rel="prefetch" href="/common/security-features/subresource/image.py">
+ </head>
+ <body>
+ <p>Check that resources loaded via link rel prefetch use the referrer
+ and referrer policy from the document.</p>
+
+ <script>
+ var img_url = "/common/security-features/subresource/image.py";
+ promise_test((t) => timeoutPromise(t, 1000)
+ .then(() => requestViaImage(img_url, null))
+ .then(message => {
+ assert_equals(message.headers.referer, document.location.origin + "/");
+ }),
+ "Prefetched image.");
+ </script>
+
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/generic/meta-referrer-outofhead-fetch.http.html b/testing/web-platform/tests/referrer-policy/generic/meta-referrer-outofhead-fetch.http.html
new file mode 100644
index 0000000000..1b7a7bada5
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/generic/meta-referrer-outofhead-fetch.http.html
@@ -0,0 +1,21 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <meta charset="utf-8">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ </head>
+ <body>
+ <meta name="referrer" content="no-referrer">
+ <script>
+ promise_test((t) =>
+ fetch("/common/security-features/subresource/xhr.py")
+ .then(res => res.json())
+ .then(data => {
+ assert_equals(data.headers.referer, undefined);
+ }),
+ "Referer header was not send");
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/generic/meta-referrer-removed-1.http.html b/testing/web-platform/tests/referrer-policy/generic/meta-referrer-removed-1.http.html
new file mode 100644
index 0000000000..7027788504
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/generic/meta-referrer-removed-1.http.html
@@ -0,0 +1,25 @@
+<!DOCTYPE html>
+<head>
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+
+ <meta name="referrer" content="no-referrer" id="referrermeta">
+</head>
+<body>
+ <script>
+ async function fetchAndGetReferrer() {
+ let response = await fetch('/common/security-features/subresource/xhr.py');
+ let data = await response.json();
+ return data.headers.referer;
+ }
+
+ promise_test(async t => {
+ assert_equals(await fetchAndGetReferrer(), undefined,
+ 'referrer should not be set');
+
+ document.getElementById('referrermeta').remove();
+ assert_equals(await fetchAndGetReferrer(), undefined,
+ 'referrer should not be set');
+ }, 'removing <meta name="referrer"> should not change referrer policy');
+ </script>
+</body>
diff --git a/testing/web-platform/tests/referrer-policy/generic/meta-referrer-removed-2.http.html b/testing/web-platform/tests/referrer-policy/generic/meta-referrer-removed-2.http.html
new file mode 100644
index 0000000000..42f73e8781
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/generic/meta-referrer-removed-2.http.html
@@ -0,0 +1,34 @@
+<!DOCTYPE html>
+<head>
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+
+ <meta name="referrer" content="no-referrer" id="referrermeta">
+</head>
+<body>
+ <script>
+ async function fetchAndGetReferrer() {
+ let response = await fetch('/common/security-features/subresource/xhr.py');
+ let data = await response.json();
+ return data.headers.referer;
+ }
+
+ promise_test(async t => {
+ assert_equals(await fetchAndGetReferrer(), undefined,
+ 'referrer should not be set');
+
+ // Add second meta tag.
+ const second_meta = document.createElement('meta');
+ second_meta.name = 'referrer';
+ second_meta.content = 'strict-origin';
+ document.head.appendChild(second_meta);
+ // Second meta should override the first.
+ assert_equals(await fetchAndGetReferrer(), location.origin + '/',
+ 'referrer should be origin only');
+
+ second_meta.remove();
+ assert_equals(await fetchAndGetReferrer(), window.location.origin + '/',
+ 'referrer should be origin only');
+ }, 'referrer policy does not change when second <meta name="referrer"> is removed');
+ </script>
+</body>
diff --git a/testing/web-platform/tests/referrer-policy/generic/meta-tag-in-svg-image.html b/testing/web-platform/tests/referrer-policy/generic/meta-tag-in-svg-image.html
new file mode 100644
index 0000000000..5bdc2c1abf
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/generic/meta-tag-in-svg-image.html
@@ -0,0 +1,31 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <title>Referrer Policy: Meta tag in svg image loaded via img should not change referrer policy</title>
+ <meta name="referrer" content="origin"/>
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <!-- Common global functions for referrer-policy tests. -->
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ async_test(function(t) {
+ var img = document.createElement("img");
+ img.onload = function() {
+ var urlPath = '/common/security-features/subresource/image.py?cache_destroyer=' + (new Date()).getTime();
+ return requestViaImage(urlPath, null, 'always')
+ .then(t.step_func(function(message) {
+ assert_equals(message.referrer, self.origin + '/');
+ }))
+ .finally(function() { t.done(); });
+ };
+ img.onerror = t.step_func_done(function() {
+ assert_unreached("img should load");
+ });
+ img.src = "./resources/img-with-referrer-policy.svg";
+ document.body.appendChild(img);
+ }, "Meta tag in SVG image loaded via img should be ignored");
+ </script>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/generic/multiple-headers-and-values.html b/testing/web-platform/tests/referrer-policy/generic/multiple-headers-and-values.html
new file mode 100644
index 0000000000..e6b7b07d51
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/generic/multiple-headers-and-values.html
@@ -0,0 +1,30 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <title>Referrer Policy: multiple Referrer-Policy header and header values are allowed</title>
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ </head>
+ <body>
+ <h1>Referrer Policy: multiple Referrer-Policy header and header values are allowed</h1>
+ <p></p>
+
+ <pre id="received_message">Running...</pre>
+
+ <script>
+ promise_test(() => {
+ var urlPath = '/common/security-features/subresource/image.py?cache_destroyer=' + (new Date()).getTime();
+ var url = location.protocol + "//www1." + location.hostname + ":" + location.port +
+ urlPath;
+ return requestViaImage(url, null, 'no-referrer')
+ .then(function(message) {
+ assert_equals(message.referrer, document.location.origin + "/");
+ });
+ }, "Image uses the last recognized Referrer-Policy header value");
+ </script>
+
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/generic/multiple-headers-and-values.html.headers b/testing/web-platform/tests/referrer-policy/generic/multiple-headers-and-values.html.headers
new file mode 100644
index 0000000000..d1acc2f1d3
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/generic/multiple-headers-and-values.html.headers
@@ -0,0 +1,2 @@
+Referrer-Policy: no-referrer
+Referrer-Policy: no-referrer,origin
diff --git a/testing/web-platform/tests/referrer-policy/generic/multiple-headers-combined.html b/testing/web-platform/tests/referrer-policy/generic/multiple-headers-combined.html
new file mode 100644
index 0000000000..b5c27515df
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/generic/multiple-headers-combined.html
@@ -0,0 +1,30 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <title>Referrer Policy: multiple Referrer-Policy header values are allowed</title>
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ </head>
+ <body>
+ <h1>Referrer Policy: multiple Referrer-Policy header values are allowed</h1>
+ <p></p>
+
+ <pre id="received_message">Running...</pre>
+
+ <script>
+ promise_test(() => {
+ var urlPath = '/common/security-features/subresource/image.py?cache_destroyer=' + (new Date()).getTime();
+ var url = location.protocol + "//www1." + location.hostname + ":" + location.port +
+ urlPath;
+ return requestViaImage(url, null, 'no-referrer')
+ .then(function(message) {
+ assert_equals(message.referrer, document.location.origin + "/");
+ });
+ }, "Image uses the last recognized Referrer-Policy header value");
+ </script>
+
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/generic/multiple-headers-combined.html.headers b/testing/web-platform/tests/referrer-policy/generic/multiple-headers-combined.html.headers
new file mode 100644
index 0000000000..fc30a2a186
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/generic/multiple-headers-combined.html.headers
@@ -0,0 +1 @@
+Referrer-Policy: no-referrer, origin
diff --git a/testing/web-platform/tests/referrer-policy/generic/multiple-headers-one-invalid.html b/testing/web-platform/tests/referrer-policy/generic/multiple-headers-one-invalid.html
new file mode 100644
index 0000000000..eca734601a
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/generic/multiple-headers-one-invalid.html
@@ -0,0 +1,34 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <title>Referrer Policy: multiple Referrer-Policy headers with one invalid</title>
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ </head>
+ <body>
+ <h1>Referrer Policy: multiple Referrer-Policy headers with one invalid</h1>
+ <p></p>
+
+ <pre id="received_message">Running...</pre>
+
+ <script>
+ promise_test(() => {
+ var urlPath = '/common/security-features/subresource/image.py?cache_destroyer=' + (new Date()).getTime();
+ // The default referrer policy is strict-origin-when-cross-origin.
+ // This document's headers contain the 'origin' and 'no-referrer' tokens,
+ // and we're making a same-origin image load, so, if the image request,
+ // uses the default policy (which is what this test's verifying), we
+ // should see the full initiating URL in the referrer, rather than just
+ // the origin or an empty string.
+ return requestViaImage(urlPath, null, 'no-referrer')
+ .then(function(message) {
+ assert_equals(message.referrer, document.location.href);
+ });
+ }, "Referrer policy header parsing fails if one header is invalid");
+ </script>
+
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/generic/multiple-headers-one-invalid.html.headers b/testing/web-platform/tests/referrer-policy/generic/multiple-headers-one-invalid.html.headers
new file mode 100644
index 0000000000..0752193804
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/generic/multiple-headers-one-invalid.html.headers
@@ -0,0 +1,2 @@
+Referrer-Policy: origin
+Referrer-Policy: origin no-referrer
diff --git a/testing/web-platform/tests/referrer-policy/generic/multiple-headers-one-unknown-token.html b/testing/web-platform/tests/referrer-policy/generic/multiple-headers-one-unknown-token.html
new file mode 100644
index 0000000000..f07500e546
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/generic/multiple-headers-one-unknown-token.html
@@ -0,0 +1,30 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <title>Referrer Policy: multiple Referrer-Policy headers with one invalid</title>
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ </head>
+ <body>
+ <h1>Referrer Policy: multiple Referrer-Policy headers with one invalid</h1>
+ <p></p>
+
+ <pre id="received_message">Running...</pre>
+
+ <script>
+ promise_test(() => {
+ var urlPath = '/common/security-features/subresource/image.py?cache_destroyer=' + (new Date()).getTime();
+ var url = location.protocol + "//www1." + location.hostname + ":" + location.port +
+ urlPath;
+ return requestViaImage(url, null, 'no-referrer')
+ .then(function(message) {
+ assert_equals(message.referrer, document.location.origin + "/");
+ });
+ }, "Image uses last recognized referrer policy token from Referrer-Policy headers");
+ </script>
+
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/generic/multiple-headers-one-unknown-token.html.headers b/testing/web-platform/tests/referrer-policy/generic/multiple-headers-one-unknown-token.html.headers
new file mode 100644
index 0000000000..46feffd705
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/generic/multiple-headers-one-unknown-token.html.headers
@@ -0,0 +1,2 @@
+Referrer-Policy: no-referrer
+Referrer-Policy: origin,not-a-valid-token
diff --git a/testing/web-platform/tests/referrer-policy/generic/multiple-headers.html b/testing/web-platform/tests/referrer-policy/generic/multiple-headers.html
new file mode 100644
index 0000000000..d6c3a90ccb
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/generic/multiple-headers.html
@@ -0,0 +1,30 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <title>Referrer Policy: multiple Referrer-Policy headers are allowed</title>
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ </head>
+ <body>
+ <h1>Referrer Policy: multiple Referrer-Policy headers are allowed</h1>
+ <p></p>
+
+ <pre id="received_message">Running...</pre>
+
+ <script>
+ promise_test(() => {
+ var urlPath = '/common/security-features/subresource/image.py?cache_destroyer=' + (new Date()).getTime();
+ var url = location.protocol + "//www1." + location.hostname + ":" + location.port +
+ urlPath;
+ return requestViaImage(url, null, 'no-referrer')
+ .then(function(message) {
+ assert_equals(message.referrer, document.location.origin + "/");
+ });
+ }, "Image uses the last recognized Referrer-Policy header");
+ </script>
+
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/generic/multiple-headers.html.headers b/testing/web-platform/tests/referrer-policy/generic/multiple-headers.html.headers
new file mode 100644
index 0000000000..dd1dd853f2
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/generic/multiple-headers.html.headers
@@ -0,0 +1,2 @@
+Referrer-Policy: no-referrer
+Referrer-Policy: origin
diff --git a/testing/web-platform/tests/referrer-policy/generic/resources/img-with-referrer-policy.svg b/testing/web-platform/tests/referrer-policy/generic/resources/img-with-referrer-policy.svg
new file mode 100644
index 0000000000..d54232d7bb
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/generic/resources/img-with-referrer-policy.svg
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg width="100%" height="100%" version="1.1"
+xmlns="http://www.w3.org/2000/svg">
+ <meta xmlns="http://www.w3.org/1999/xhtml" name="referrer" content="unsafe-url"/>
+ <circle cx="10" cy="10" r="10" stroke="black" stroke-width="1" fill="red" />
+</svg> \ No newline at end of file
diff --git a/testing/web-platform/tests/referrer-policy/generic/resources/referrer.py b/testing/web-platform/tests/referrer-policy/generic/resources/referrer.py
new file mode 100644
index 0000000000..2d15dc09c4
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/generic/resources/referrer.py
@@ -0,0 +1,10 @@
+def main(request, response):
+ response_headers = [(b"Access-Control-Allow-Origin", b"*")]
+ body = b"""
+ <p id=referrer>%s</p>
+ <script>
+ const referrer_text = referrer.textContent;
+ window.parent.postMessage(referrer_text, "*");
+ </script>
+ """ % request.headers.get(b"referer", b"")
+ return (200, response_headers, body)
diff --git a/testing/web-platform/tests/referrer-policy/generic/sandboxed-iframe-with-opaque-origin.html b/testing/web-platform/tests/referrer-policy/generic/sandboxed-iframe-with-opaque-origin.html
new file mode 100644
index 0000000000..fd1857e0dd
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/generic/sandboxed-iframe-with-opaque-origin.html
@@ -0,0 +1,93 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <title>Referrer Policy: Sandboxed iframes with opaque origins don't send referrers</title>
+ <link rel="author" title="Jochen Eisinger" href="mailto:jochen@chromium.org">
+ <link rel="author" title="Arthur Sonzogni" href="mailto:arthursonzogni@chromium.org">
+ <link rel="help" href="https://w3c.github.io/webappsec-referrer-policy/#determine-requests-referrer">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <!-- Common global functions for referrer-policy tests. -->
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="/common/get-host-info.sub.js"></script>
+</head>
+<body>
+<h1>
+ Referrer Policy: A document with an opaque origin doesn't send referrers
+</h1>
+<script>
+
+let futureMessage = function() {
+ return new Promise(resolve => {
+ window.addEventListener("message", event => resolve(event.data));
+ });
+}
+
+function testSandboxedIframeSubresource(description,
+ sandboxAttributes,
+ expectedReferrer) {
+ promise_test(async test => {
+ let resource_url = get_host_info().HTTP_NOTSAMESITE_ORIGIN +
+ "/common/security-features/subresource/xhr.py";
+ const iframe = document.createElement("iframe");
+ iframe.sandbox = sandboxAttributes;
+ iframe.srcdoc = `
+ <meta name="referrer" content="always">
+ <script src="/common/security-features/resources/common.sub.js">
+ </scr`+`ipt>
+ <script>
+ requestViaFetch("${resource_url}").then((msg) => {
+ parent.postMessage(msg.referrer, '*');
+ }).catch((e) => {
+ parent.postMessage("FAILURE", '*');
+ });
+ </scr`+`ipt>
+ `;
+
+ const future_message = futureMessage();
+ document.body.appendChild(iframe);
+ assert_equals(await future_message, expectedReferrer);
+
+ }, description);
+}
+
+function testSandboxedIframeMainResource(description,
+ sandboxAttributes,
+ expectedReferrer) {
+ promise_test(async test => {
+ let document_url = get_host_info().HTTP_NOTSAMESITE_ORIGIN +
+ "/referrer-policy/generic/resources/referrer.py";
+ const iframe = document.createElement("iframe");
+ iframe.sandbox = sandboxAttributes;
+ iframe.srcdoc = `
+ <meta name="referrer" content="always">
+ <script>
+ onload = () => {
+ location.href = "${document_url}";
+ }
+ </scr`+`ipt>
+ `;
+
+ const future_message = futureMessage();
+ document.body.appendChild(iframe);
+ assert_equals(await future_message, expectedReferrer);
+
+ }, description);
+}
+
+testSandboxedIframeSubresource(
+ "Sandboxed iframe with opaque origin doesn't send referrers to subresources",
+ "allow-scripts", undefined);
+testSandboxedIframeSubresource(
+ "Sandboxed iframe with tuple origin sends referrers to subresources",
+ "allow-same-origin allow-scripts", document.location.href);
+testSandboxedIframeMainResource(
+ "Sandboxed iframe with opaque origin doesn't send referrers on navigation",
+ "allow-scripts", "");
+testSandboxedIframeMainResource(
+ "Sandboxed iframe with tuple origin sends referrers on navigation",
+ "allow-same-origin allow-scripts", document.location.href);
+
+</script>
+</body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/generic/sanity-checker.js b/testing/web-platform/tests/referrer-policy/generic/sanity-checker.js
new file mode 100644
index 0000000000..e296ce93b9
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/generic/sanity-checker.js
@@ -0,0 +1,46 @@
+// The SanityChecker is used in debug mode to identify problems with the
+// structure of the testsuite. In release mode it is mocked out to do nothing.
+
+function SanityChecker() {}
+
+SanityChecker.prototype.checkScenario = function(scenario) {
+ // Check if scenario is valid.
+ // TODO(kristijanburnik): Move to a sanity-checks.js for debug mode only.
+ test(function() {
+
+ // We extend the exsiting test_expansion_schema not to kill performance by
+ // copying.
+ var expectedFields = SPEC_JSON["test_expansion_schema"];
+ expectedFields["referrer_policy"] = SPEC_JSON["referrer_policy_schema"];
+
+ for (var field in expectedFields) {
+ assert_own_property(scenario, field,
+ "The scenario contains field " + field)
+ assert_in_array(scenario[field], expectedFields[field],
+ "Scenario's " + field + " is one of: " +
+ expectedFields[field].join(", ")) + "."
+ }
+
+ // Check if the protocol is matched.
+ assert_equals(scenario["source_protocol"] + ":", location.protocol,
+ "Protocol of the test page should match the scenario.")
+
+ }, "[ReferrerPolicyTestCase] The test scenario is valid.");
+}
+
+SanityChecker.prototype.checkSubresourceResult = function(scenario,
+ subresourceUrl,
+ result) {
+ assert_equals(Object.keys(result).length, 3);
+ assert_own_property(result, "location");
+ assert_own_property(result, "referrer");
+ assert_own_property(result, "headers");
+
+ // Skip location check for scripts.
+ if (scenario.subresource == "script-tag")
+ return;
+
+ // Sanity check: location of sub-resource matches reported location.
+ assert_equals(result.location, subresourceUrl,
+ "Subresource reported location.");
+};
diff --git a/testing/web-platform/tests/referrer-policy/generic/second-meta-referrer-added-before-first.http.html b/testing/web-platform/tests/referrer-policy/generic/second-meta-referrer-added-before-first.http.html
new file mode 100644
index 0000000000..38fab901fb
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/generic/second-meta-referrer-added-before-first.http.html
@@ -0,0 +1,31 @@
+<!DOCTYPE html>
+<head>
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+
+ <meta name="referrer" content="no-referrer" id="referrermeta">
+</head>
+<body>
+ <script>
+ async function fetchAndGetReferrer() {
+ let response = await fetch('/common/security-features/subresource/xhr.py');
+ let data = await response.json();
+ return data.headers.referer;
+ }
+
+ promise_test(async t => {
+ assert_equals(await fetchAndGetReferrer(), undefined,
+ 'referrer should not be set');
+
+ // Add second meta _before_ first meta.
+ const first_meta = document.getElementById('referrermeta');
+ const second_meta = document.createElement('meta');
+ second_meta.name = 'referrer';
+ second_meta.content = 'strict-origin';
+ document.head.insertBefore(second_meta, first_meta);
+ assert_equals(await fetchAndGetReferrer(), window.location.origin + '/',
+ 'referrer should the origin only');
+ }, 'document referrer policy is the value of the most recently added <meta name="referrer">');
+
+ </script>
+</body>
diff --git a/testing/web-platform/tests/referrer-policy/generic/subresource-test/area-navigate.html b/testing/web-platform/tests/referrer-policy/generic/subresource-test/area-navigate.html
new file mode 100644
index 0000000000..2a4f29654d
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/generic/subresource-test/area-navigate.html
@@ -0,0 +1,39 @@
+<!DOCTYPE html>
+<!-- TODO(kristijanburnik): Remove subres. duplication. Reuse a template. -->
+<html>
+ <head>
+ <title>Area Link messaging - cross-origin Area Link navigation</title>
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <!-- Common global functions for referrer-policy tests. -->
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ </head>
+ <body>
+ <h1>Area Link messaging - cross-origin Area Link navigation</h1>
+ <p>If you can read JSON encoded HTTP request headers of the Area link below,
+ the messaging works as expected.</p>
+
+ <pre id="received_message">Running...</pre>
+
+ <script>
+ promise_test(function() {
+ var urlPath = '/common/security-features/subresource/document.py';
+ var url = location.protocol + "//www1." + location.hostname + ":" + location.port +
+ urlPath;
+ return requestViaArea(url)
+ .then(function(message) {
+ var pre = document.getElementById('received_message')
+ var headers = message.headers;
+ pre.innerHTML = "";
+ pre.innerHTML += url + ":\n\n";
+ pre.innerHTML += JSON.stringify(headers, null, 2) + "\n\n"
+ assert_own_property(headers, "host")
+ assert_own_property(headers, "connection")
+ });
+ },
+ "Area is responding with HTTP headers");
+ </script>
+
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/generic/subresource-test/attr-referrer-invalid-value.html b/testing/web-platform/tests/referrer-policy/generic/subresource-test/attr-referrer-invalid-value.html
new file mode 100644
index 0000000000..bfdf1166ce
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/generic/subresource-test/attr-referrer-invalid-value.html
@@ -0,0 +1,25 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <title>Invalid referrerPolicy attribute value</title>
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ </head>
+ <body>
+ <h1>Invalid referrerPolicy attribute value</h1>
+ <pre>Running...</pre>
+
+ <script>
+ test(function () {
+ var elements = ["iframe", "img", "a", "area", "link", "script"];
+ for (var i = 0; i < elements.length; i++) {
+ var elem = document.createElement(elements[i]);
+ elem.referrerPolicy = "unsafe-url";
+ assert_equals(elem.referrerPolicy, "unsafe-url");
+ elem.referrerPolicy = "not-valid-value";
+ assert_equals(elem.referrerPolicy, "");
+ }
+ }, "Invalid referrerpolicy values not reflected");
+ </script>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/generic/subresource-test/fetch-messaging.html b/testing/web-platform/tests/referrer-policy/generic/subresource-test/fetch-messaging.html
new file mode 100644
index 0000000000..2678af822e
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/generic/subresource-test/fetch-messaging.html
@@ -0,0 +1,42 @@
+<!DOCTYPE html>
+<!-- TODO(kristijanburnik): Remove subres. duplication. Reuse a template. -->
+<html>
+ <head>
+ <title>Fetch messaging - same-origin Fetch request</title>
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <!-- Common global functions for referrer-policy tests. -->
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ </head>
+ <body>
+ <h1>Fetch messaging - same-origin Fetch request</h1>
+ <p>If you can read JSON encoded HTTP request headers of the Fetch below,
+ the messaging works as expected.</p>
+
+ <pre id="received_message">Running...</pre>
+
+ <script>
+ test(function() {
+ assert_true(!!window.fetch, "Fetch is not supported by this browser.");
+ }, "Fetch is supported by the browser.");
+
+ promise_test(function() {
+ var urlPath = '/common/security-features/subresource/xhr.py';
+ var url = location.protocol + "//" + location.hostname + ":" +
+ location.port + urlPath;
+ return requestViaFetch(url)
+ .then(function(message) {
+ var pre = document.getElementById('received_message')
+ var headers = message.headers;
+ pre.innerHTML = "";
+ pre.innerHTML += url + ":\n\n";
+ pre.innerHTML += JSON.stringify(headers, null, 2) + "\n\n";
+ assert_own_property(headers, "host")
+ assert_own_property(headers, "connection")
+ });
+ }, "Fetch is responding with HTTP headers");
+ </script>
+
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/generic/subresource-test/iframe-messaging.html b/testing/web-platform/tests/referrer-policy/generic/subresource-test/iframe-messaging.html
new file mode 100644
index 0000000000..b8bdb0e5e0
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/generic/subresource-test/iframe-messaging.html
@@ -0,0 +1,38 @@
+<!DOCTYPE html>
+<!-- TODO(kristijanburnik): Remove subres. duplication. Reuse a template. -->
+<html>
+ <head>
+ <title>Iframe messaging - cross-origin iframe request</title>
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <!-- Common global functions for referrer-policy tests. -->
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ </head>
+ <body>
+ <h1>Iframe messaging - cross-origin iframe request</h1>
+ <p>If you can read JSON encoded HTTP request headers of the iframe below,
+ the messaging works as expected.</p>
+
+ <pre id="received_message">Running...</pre>
+
+ <script>
+ promise_test(function() {
+ var urlPath = '/common/security-features/subresource/document.py';
+ var url = location.protocol + "//www1." + location.hostname + ":" + location.port +
+ urlPath;
+ return requestViaIframe(url)
+ .then(function(message) {
+ var pre = document.getElementById('received_message')
+ var headers = message.headers;
+ pre.innerHTML = "";
+ pre.innerHTML += url + ":\n\n";
+ pre.innerHTML += JSON.stringify(headers, null, 2) + "\n\n"
+ assert_own_property(headers, "host")
+ assert_own_property(headers, "connection")
+ });
+ }, "Iframe is responding with HTTP headers");
+ </script>
+
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/generic/subresource-test/image-decoding.html b/testing/web-platform/tests/referrer-policy/generic/subresource-test/image-decoding.html
new file mode 100644
index 0000000000..76ce0e263a
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/generic/subresource-test/image-decoding.html
@@ -0,0 +1,38 @@
+<!DOCTYPE html>
+<!-- TODO(kristijanburnik): Remove subres. duplication. Reuse a template. -->
+<html>
+ <head>
+ <title>Image decoding - cross-origin image request</title>
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <!-- Common global functions for referrer-policy tests. -->
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ </head>
+ <body>
+ <h1>Image decoding - cross-origin image request</h1>
+ <p>If you can read JSON encoded HTTP headers of the image below,
+ the decoding works as expected.</p>
+
+ <pre id="received_message">Running...</pre>
+
+ <script>
+ promise_test(function() {
+ var urlPath = '/common/security-features/subresource/image.py';
+ var url = location.protocol + "//www1." + location.hostname + ":" + location.port +
+ urlPath + "?cache_destroyer=" + (new Date()).getTime();
+ return requestViaImage(url, undefined, "always")
+ .then(function(message) {
+ var pre = document.getElementById('received_message')
+ var headers = message.headers;
+ pre.innerHTML = "";
+ pre.innerHTML += url + ":\n\n";
+ pre.innerHTML += JSON.stringify(headers, null, 2) + "\n\n"
+ assert_own_property(headers, "host")
+ assert_own_property(headers, "connection")
+ });
+ }, "Image is encoding headers as JSON.");
+ </script>
+
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/generic/subresource-test/link-navigate.html b/testing/web-platform/tests/referrer-policy/generic/subresource-test/link-navigate.html
new file mode 100644
index 0000000000..21783d3e31
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/generic/subresource-test/link-navigate.html
@@ -0,0 +1,38 @@
+<!DOCTYPE html>
+<!-- TODO(kristijanburnik): Remove subres. duplication. Reuse a template. -->
+<html>
+ <head>
+ <title>Link messaging - cross-origin Link navigation</title>
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <!-- Common global functions for referrer-policy tests. -->
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ </head>
+ <body>
+ <h1>Link messaging - cross-origin Link navigation</h1>
+ <p>If you can read JSON encoded HTTP request headers of the Link below,
+ the messaging works as expected.</p>
+
+ <pre id="received_message">Running...</pre>
+
+ <script>
+ promise_test(function() {
+ var urlPath = '/common/security-features/subresource/document.py';
+ var url = location.protocol + "//www1." + location.hostname + ":" + location.port +
+ urlPath;
+ return requestViaAnchor(url)
+ .then(function(message) {
+ var pre = document.getElementById('received_message')
+ var headers = message.headers;
+ pre.innerHTML = "";
+ pre.innerHTML += url + ":\n\n";
+ pre.innerHTML += JSON.stringify(headers, null, 2) + "\n\n"
+ assert_own_property(headers, "host")
+ assert_own_property(headers, "connection")
+ });
+ }, "Link is responding with HTTP headers");
+ </script>
+
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/generic/subresource-test/script-messaging.html b/testing/web-platform/tests/referrer-policy/generic/subresource-test/script-messaging.html
new file mode 100644
index 0000000000..1bc0ba13ef
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/generic/subresource-test/script-messaging.html
@@ -0,0 +1,38 @@
+<!DOCTYPE html>
+<!-- TODO(kristijanburnik): Remove subres. duplication. Reuse a template. -->
+<html>
+ <head>
+ <title>Script messaging - cross-origin Script request</title>
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <!-- Common global functions for referrer-policy tests. -->
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ </head>
+ <body>
+ <h1>Script messaging - cross-origin Script request</h1>
+ <p>If you can read JSON encoded HTTP request headers of the Script below,
+ the messaging works as expected.</p>
+
+ <pre id="received_message">Running...</pre>
+
+ <script>
+ promise_test(function() {
+ var urlPath = '/common/security-features/subresource/script.py';
+ var url = location.protocol + "//www1." + location.hostname + ":" + location.port +
+ urlPath;
+ return requestViaScript(url)
+ .then(function(message) {
+ var pre = document.getElementById('received_message')
+ var headers = message.headers;
+ pre.innerHTML = "";
+ pre.innerHTML += url + ":\n\n";
+ pre.innerHTML += JSON.stringify(headers, null, 2) + "\n\n"
+ assert_own_property(headers, "host")
+ assert_own_property(headers, "connection")
+ });
+ }, "Script is responding with HTTP headers");
+ </script>
+
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/generic/subresource-test/worker-messaging.html b/testing/web-platform/tests/referrer-policy/generic/subresource-test/worker-messaging.html
new file mode 100644
index 0000000000..c2db8fe845
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/generic/subresource-test/worker-messaging.html
@@ -0,0 +1,38 @@
+<!DOCTYPE html>
+<!-- TODO(kristijanburnik): Remove subres. duplication. Reuse a template. -->
+<html>
+ <head>
+ <title>Worker messaging - same-origin Worker request</title>
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <!-- Common global functions for referrer-policy tests. -->
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ </head>
+ <body>
+ <h1>Worker messaging - same-origin Worker request</h1>
+ <p>If you can read JSON encoded HTTP request headers of the Worker below,
+ the messaging works as expected.</p>
+
+ <pre id="received_message">Running...</pre>
+
+ <script>
+ promise_test(function() {
+ var urlPath = '/common/security-features/subresource/worker.py';
+ var url = location.protocol + "//" + location.hostname + ":" +
+ location.port + urlPath;
+ return requestViaDedicatedWorker(url, {})
+ .then(function(message) {
+ var pre = document.getElementById('received_message')
+ var headers = message.headers;
+ pre.innerHTML = "";
+ pre.innerHTML += url + ":\n\n";
+ pre.innerHTML += JSON.stringify(headers, null, 2) + "\n\n"
+ assert_own_property(headers, "host")
+ assert_own_property(headers, "connection")
+ });
+ }, "Worker is responding with HTTP headers");
+ </script>
+
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/generic/subresource-test/xhr-messaging.html b/testing/web-platform/tests/referrer-policy/generic/subresource-test/xhr-messaging.html
new file mode 100644
index 0000000000..c1f89919ca
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/generic/subresource-test/xhr-messaging.html
@@ -0,0 +1,38 @@
+<!DOCTYPE html>
+<!-- TODO(kristijanburnik): Remove subres. duplication. Reuse a template. -->
+<html>
+ <head>
+ <title>XHR messaging - cross-origin XHR request</title>
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <!-- Common global functions for referrer-policy tests. -->
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ </head>
+ <body>
+ <h1>XHR messaging - cross-origin XHR request</h1>
+ <p>If you can read JSON encoded HTTP request headers of the XHR below,
+ the messaging works as expected.</p>
+
+ <pre id="received_message">Running...</pre>
+
+ <script>
+ promise_test(function() {
+ var urlPath = '/common/security-features/subresource/xhr.py';
+ var url = location.protocol + "//www1." + location.hostname + ":" + location.port +
+ urlPath;
+ return requestViaXhr(url)
+ .then(function(message) {
+ var pre = document.getElementById('received_message')
+ var headers = message.headers;
+ pre.innerHTML = "";
+ pre.innerHTML += url + ":\n\n";
+ pre.innerHTML += JSON.stringify(headers, null, 2) + "\n\n"
+ assert_own_property(headers, "host")
+ assert_own_property(headers, "connection")
+ });
+ }, "XHR is responding with HTTP headers");
+ </script>
+
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/generic/test-case.sub.js b/testing/web-platform/tests/referrer-policy/generic/test-case.sub.js
new file mode 100644
index 0000000000..717cd1a5e7
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/generic/test-case.sub.js
@@ -0,0 +1,127 @@
+// https://w3c.github.io/webappsec-referrer-policy/#strip-url
+function stripUrlForUseAsReferrer(url, originOnly) {
+ // Step 2. If url’s scheme is a local scheme, then return no referrer.
+ const parsedUrl = new URL(url);
+
+ if (["about:", "blob:", "data:"].includes(parsedUrl.protocol))
+ return undefined;
+
+ // Step 3. Set url’s username to the empty string.
+ parsedUrl.username = '';
+
+ // Step 4. Set url’s password to null.
+ parsedUrl.password = '';
+
+ // Step 5. Set url’s fragment to null.
+ parsedUrl.hash = '';
+
+ // Step 6. If the origin-only flag is true, then:
+ if (originOnly) {
+ // Step 6.1. Set url’s path to null.
+ parsedUrl.pathname = '';
+ // Step 6.2. Set url’s query to null.
+ parsedUrl.search = '';
+ }
+ return parsedUrl.href;
+}
+
+function invokeScenario(scenario) {
+ const urls = getRequestURLs(
+ scenario.subresource,
+ scenario.origin,
+ scenario.redirection);
+ /** @type {Subresource} */
+ const subresource = {
+ subresourceType: scenario.subresource,
+ url: urls.testUrl,
+ policyDeliveries: scenario.subresource_policy_deliveries,
+ };
+
+ return invokeRequest(subresource, scenario.source_context_list);
+}
+
+const referrerUrlResolver = {
+ // The spec allows UAs to "enforce arbitrary policy considerations in the
+ // interests of minimizing data leakage"; to start to vaguely approximate
+ // this, we allow stronger policies to be used instead of what's specificed.
+ "omitted": function(sourceUrl) {
+ return [undefined];
+ },
+ "origin": function(sourceUrl) {
+ return [stripUrlForUseAsReferrer(sourceUrl, true),
+ undefined];
+ },
+ "stripped-referrer": function(sourceUrl) {
+ return [stripUrlForUseAsReferrer(sourceUrl, false),
+ stripUrlForUseAsReferrer(sourceUrl, true),
+ undefined];
+ }
+};
+
+function checkResult(scenario, expectation, result) {
+// https://w3c.github.io/webappsec-referrer-policy/#determine-requests-referrer
+ let referrerSource = result.sourceContextUrl;
+ const sentFromSrcdoc = scenario.source_context_list.length > 0 &&
+ scenario.source_context_list[scenario.source_context_list.length - 1]
+ .sourceContextType === 'srcdoc';
+ if (sentFromSrcdoc) {
+ // Step 3. While document is an iframe srcdoc document, let document be
+ // document's browsing context's browsing context container's node
+ // document. [spec text]
+
+ // Workaround for srcdoc cases. Currently we only test <iframe srcdoc>
+ // inside the top-level Document, so |document| in the spec here is
+ // the top-level Document.
+ // This doesn't work if e.g. we test <iframe srcdoc> inside another
+ // external <iframe>.
+ referrerSource = location.toString();
+ }
+ const possibleReferrerUrls =
+ referrerUrlResolver[expectation](referrerSource);
+
+ // Check the reported URL.
+ assert_in_array(result.referrer,
+ possibleReferrerUrls,
+ "document.referrer");
+ assert_in_array(result.headers.referer,
+ possibleReferrerUrls,
+ "HTTP Referer header");
+}
+
+function runLengthTest(scenario, urlLength, expectation, testDescription) {
+ // `Referer` headers with length over 4k are culled down to an origin, so,
+ // let's test around that boundary for tests that would otherwise return
+ // the complete URL.
+ history.pushState(null, null, "/");
+ history.replaceState(null, null,
+ "A".repeat(urlLength - location.href.length));
+
+ promise_test(t => {
+ assert_equals(scenario.expectation, "stripped-referrer");
+ // Only on top-level Window, due to navigations using `history`.
+ assert_equals(scenario.source_context_list.length, 0);
+
+ return invokeScenario(scenario)
+ .then(result => checkResult(scenario, expectation, result));
+ }, testDescription);
+}
+
+function TestCase(scenarios, sanityChecker) {
+ function runTest(scenario) {
+ // This check is A NOOP in release.
+ sanityChecker.checkScenario(scenario);
+
+ promise_test(_ => {
+ return invokeScenario(scenario)
+ .then(result => checkResult(scenario, scenario.expectation, result));
+ }, scenario.test_description);
+ }
+
+ function runTests() {
+ for (const scenario of scenarios) {
+ runTest(scenario);
+ }
+ }
+
+ return {start: runTests};
+}
diff --git a/testing/web-platform/tests/referrer-policy/generic/unsupported-csp-referrer-directive.html b/testing/web-platform/tests/referrer-policy/generic/unsupported-csp-referrer-directive.html
new file mode 100644
index 0000000000..27a3a99113
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/generic/unsupported-csp-referrer-directive.html
@@ -0,0 +1,29 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <title>Referrer Policy: CSP 'referrer' directive should not be supported</title>
+ <meta http-equiv="Content-Security-Policy" content="referrer no-referrer">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <!-- Common global functions for referrer-policy tests. -->
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ </head>
+ <body>
+ <h1>Referrer Policy: CSP 'referrer' directive should not be supported</h1>
+ <p>CSP used to have a 'referrer' directive to set a Referrer Policy. This directive has been removed and should not be supported.</p>
+
+ <pre id="received_message">Running...</pre>
+
+ <script>
+ promise_test(function() {
+ var urlPath = '/common/security-features/subresource/image.py?cache_destroyer=' + (new Date()).getTime();
+ return requestViaImage(urlPath, null, 'always')
+ .then(function(message) {
+ assert_equals(message.referrer, document.location.href);
+ });
+ }, "Image has a referrer despite CSP 'referrer' directive");
+ </script>
+
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/spec.src.json b/testing/web-platform/tests/referrer-policy/spec.src.json
new file mode 100644
index 0000000000..0a2f244250
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/spec.src.json
@@ -0,0 +1,1134 @@
+{
+ "test_description_template": "Referrer Policy: Expects %(expectation)s for %(subresource)s to %(origin)s origin and %(redirection)s redirection from %(source_scheme)s context.",
+ "test_page_title_template": "Referrer-Policy: %(title)s",
+ "specification": [
+ {
+ // unset-referrer-policy
+ "title": "Referrer Policy is not explicitly defined",
+ "description": "Check that referrer URL follows the strict-origin-when-cross-origin policy when no explicit Referrer Policy is set.",
+ "specification_url": "https://w3c.github.io/webappsec-referrer-policy/#referrer-policies",
+ "test_expansion": [
+ {
+ // same-insecure
+ "expansion": "default",
+ "source_scheme": "http",
+ "source_context_list": "*",
+ "delivery_type": "*",
+ "delivery_value": null,
+ "redirection": "*",
+ "origin": "same-http",
+ "subresource": "*",
+ "expectation": "stripped-referrer"
+ },
+ {
+ // same-insecure
+ "expansion": "override",
+ "source_scheme": "http",
+ "source_context_list": "*",
+ "delivery_type": "*",
+ "delivery_value": null,
+ "redirection": "swap-origin",
+ "origin": "same-http",
+ "subresource": "*",
+ "expectation": "origin"
+ },
+ {
+ // cross-insecure
+ "expansion": "default",
+ "source_scheme": "http",
+ "source_context_list": "*",
+ "delivery_type": "*",
+ "delivery_value": null,
+ "redirection": "*",
+ "origin": "cross-http",
+ "subresource": "*",
+ "expectation": "origin"
+ },
+ {
+ // upgrade-protocol
+ "expansion": "default",
+ "source_scheme": "http",
+ "source_context_list": "*",
+ "delivery_type": "*",
+ "delivery_value": null,
+ "redirection": "*",
+ "origin": [
+ "same-https",
+ "cross-https"
+ ],
+ "subresource": "*",
+ "expectation": "origin"
+ },
+ {
+ // downgrade-protocol
+ "expansion": "default",
+ "source_scheme": "https",
+ "source_context_list": "*",
+ "delivery_type": "*",
+ "delivery_value": null,
+ "redirection": "*",
+ "origin": [
+ "same-http",
+ "cross-http"
+ ],
+ "subresource": "*",
+ "expectation": "omitted"
+ },
+ {
+ // same-secure
+ "expansion": "default",
+ "source_scheme": "https",
+ "source_context_list": "*",
+ "delivery_type": "*",
+ "delivery_value": null,
+ "redirection": "*",
+ "origin": "same-https",
+ "subresource": "*",
+ "expectation": "stripped-referrer"
+ },
+ {
+ // same-secure
+ "expansion": "override",
+ "source_scheme": "https",
+ "source_context_list": "*",
+ "delivery_type": "*",
+ "delivery_value": null,
+ "redirection": "swap-origin",
+ "origin": "same-https",
+ "subresource": "*",
+ "expectation": "origin"
+ },
+ {
+ // cross-secure
+ "expansion": "default",
+ "source_scheme": "https",
+ "source_context_list": "*",
+ "delivery_type": "*",
+ "delivery_value": null,
+ "redirection": "*",
+ "origin": "cross-https",
+ "subresource": "*",
+ "expectation": "origin"
+ }
+ ]
+ },
+ {
+ // meta tag default
+ "title": "<meta rel=referrer> is set to the legacy keyword 'default'",
+ "description": "Check that the 'default' legacy keyword results in behavior equivalent to the default policy (currently strict-origin-when-cross-origin)",
+ "specification_url": "https://html.spec.whatwg.org/multipage/semantics.html#the-meta-element",
+ "test_expansion": [
+ {
+ // same-insecure
+ "expansion": "default",
+ "source_scheme": "http",
+ "source_context_list": "*",
+ "delivery_type": "meta",
+ "delivery_value": "default",
+ "redirection": "*",
+ "origin": "same-http",
+ "subresource": "*",
+ "expectation": "stripped-referrer"
+ },
+ {
+ // same-insecure
+ "expansion": "override",
+ "source_scheme": "http",
+ "source_context_list": "*",
+ "delivery_type": "meta",
+ "delivery_value": "default",
+ "redirection": "swap-origin",
+ "origin": "same-http",
+ "subresource": "*",
+ "expectation": "origin"
+ },
+ {
+ // cross-insecure
+ "expansion": "default",
+ "source_scheme": "http",
+ "source_context_list": "*",
+ "delivery_type": "meta",
+ "delivery_value": "default",
+ "redirection": "*",
+ "origin": "cross-http",
+ "subresource": "*",
+ "expectation": "origin"
+ },
+ {
+ // upgrade-protocol
+ "expansion": "default",
+ "source_scheme": "http",
+ "source_context_list": "*",
+ "delivery_type": "meta",
+ "delivery_value": "default",
+ "redirection": "*",
+ "origin": [
+ "same-https",
+ "cross-https"
+ ],
+ "subresource": "*",
+ "expectation": "origin"
+ },
+ {
+ // downgrade-protocol
+ "expansion": "default",
+ "source_scheme": "https",
+ "source_context_list": "*",
+ "delivery_type": "meta",
+ "delivery_value": "default",
+ "redirection": "*",
+ "origin": [
+ "same-http",
+ "cross-http"
+ ],
+ "subresource": "*",
+ "expectation": "omitted"
+ },
+ {
+ // same-secure
+ "expansion": "default",
+ "source_scheme": "https",
+ "source_context_list": "*",
+ "delivery_type": "meta",
+ "delivery_value": "default",
+ "redirection": "*",
+ "origin": "same-https",
+ "subresource": "*",
+ "expectation": "stripped-referrer"
+ },
+ {
+ // same-secure
+ "expansion": "override",
+ "source_scheme": "https",
+ "source_context_list": "*",
+ "delivery_type": "meta",
+ "delivery_value": "default",
+ "redirection": "swap-origin",
+ "origin": "same-https",
+ "subresource": "*",
+ "expectation": "origin"
+ },
+ {
+ // cross-secure
+ "expansion": "default",
+ "source_scheme": "https",
+ "source_context_list": "*",
+ "delivery_type": "meta",
+ "delivery_value": "default",
+ "redirection": "*",
+ "origin": "cross-https",
+ "subresource": "*",
+ "expectation": "origin"
+ }
+ ]
+ },
+ {
+ // no-referrer
+ "title": "Referrer Policy is set to 'no-referrer'",
+ "description": "Check that sub-resource never gets the referrer URL.",
+ "specification_url": "https://w3c.github.io/webappsec-referrer-policy/#referrer-policy-no-referrer",
+ "test_expansion": [
+ {
+ // generic
+ "expansion": "default",
+ "source_scheme": "*",
+ "source_context_list": "*",
+ "delivery_type": "*",
+ "delivery_value": "no-referrer",
+ "redirection": "*",
+ "origin": "*",
+ "subresource": "*",
+ "expectation": "omitted"
+ }
+ ]
+ },
+ {
+ // meta tag never
+ "title": "<meta rel=referrer> is set to the legacy value 'never'",
+ "description": "Check that the legacy <meta> value 'never' is equivalent to the 'no-referrer' policy",
+ "specification_url": "https://w3c.github.io/webappsec-referrer-policy/#referrer-policy-no-referrer",
+ "test_expansion": [
+ {
+ // generic
+ "expansion": "default",
+ "source_scheme": "*",
+ "source_context_list": "*",
+ "delivery_type": "meta",
+ "delivery_value": "never",
+ "redirection": "*",
+ "origin": "*",
+ "subresource": "*",
+ "expectation": "omitted"
+ }
+ ]
+ },
+ {
+ // no-referrer-when-downgrade
+ "title": "Referrer Policy is set to 'no-referrer-when-downgrade'",
+ "description": "Check that non a priori insecure subresource gets the full Referrer URL. A priori insecure subresource gets no referrer information.",
+ "specification_url": "https://w3c.github.io/webappsec-referrer-policy/#referrer-policy-no-referrer-when-downgrade",
+ "test_expansion": [
+ {
+ // insecure-protocol
+ "expansion": "default",
+ "source_scheme": "http",
+ "source_context_list": "*",
+ "delivery_type": "*",
+ "delivery_value": "no-referrer-when-downgrade",
+ "redirection": "*",
+ "origin": [
+ "same-http",
+ "cross-http"
+ ],
+ "subresource": "*",
+ "expectation": "stripped-referrer"
+ },
+ {
+ // upgrade-protocol
+ "expansion": "default",
+ "source_scheme": "http",
+ "source_context_list": "*",
+ "delivery_type": "*",
+ "delivery_value": "no-referrer-when-downgrade",
+ "redirection": "*",
+ "origin": [
+ "same-https",
+ "cross-https"
+ ],
+ "subresource": "*",
+ "expectation": "stripped-referrer"
+ },
+ {
+ // downgrade-protocol
+ "expansion": "default",
+ "source_scheme": "https",
+ "source_context_list": "*",
+ "delivery_type": "*",
+ "delivery_value": "no-referrer-when-downgrade",
+ "redirection": "*",
+ "origin": [
+ "same-http",
+ "cross-http"
+ ],
+ "subresource": "*",
+ "expectation": "omitted"
+ },
+ {
+ // secure-protocol
+ "expansion": "default",
+ "source_scheme": "https",
+ "source_context_list": "*",
+ "delivery_type": "*",
+ "delivery_value": "no-referrer-when-downgrade",
+ "redirection": "*",
+ "origin": [
+ "same-https",
+ "cross-https"
+ ],
+ "subresource": "*",
+ "expectation": "stripped-referrer"
+ }
+ ]
+ },
+ {
+ // origin
+ "title": "Referrer Policy is set to 'origin'",
+ "description": "Check that all subresources in all casses get only the origin portion of the referrer URL.",
+ "specification_url": "https://w3c.github.io/webappsec-referrer-policy/#referrer-policy-origin",
+ "test_expansion": [
+ {
+ // generic
+ "expansion": "default",
+ "source_scheme": "*",
+ "source_context_list": "*",
+ "delivery_type": "*",
+ "delivery_value": "origin",
+ "redirection": "*",
+ "origin": "*",
+ "subresource": "*",
+ "expectation": "origin"
+ }
+ ]
+ },
+ {
+ // same-origin
+ "title": "Referrer Policy is set to 'same-origin'",
+ "description": "Check that cross-origin subresources get no referrer information and same-origin get the stripped referrer URL.",
+ "specification_url": "https://w3c.github.io/webappsec-referrer-policy/#referrer-policy-same-origin",
+ "test_expansion": [
+ {
+ // same-origin-insecure
+ "expansion": "default",
+ "source_scheme": "http",
+ "source_context_list": "*",
+ "delivery_type": "*",
+ "delivery_value": "same-origin",
+ "redirection": "*",
+ "origin": "same-http",
+ "subresource": "*",
+ "expectation": "stripped-referrer"
+ },
+ {
+ // same-origin-secure-default
+ "expansion": "default",
+ "source_scheme": "https",
+ "source_context_list": "*",
+ "delivery_type": "*",
+ "delivery_value": "same-origin",
+ "redirection": "*",
+ "origin": "same-https",
+ "subresource": "*",
+ "expectation": "stripped-referrer"
+ },
+ {
+ // same-origin-insecure
+ "expansion": "override",
+ "source_scheme": "*",
+ "source_context_list": "*",
+ "delivery_type": "*",
+ "delivery_value": "same-origin",
+ "redirection": "swap-origin",
+ "origin": [
+ "same-http",
+ "same-https"
+ ],
+ "subresource": "*",
+ "expectation": "omitted"
+ },
+ {
+ // cross-origin
+ "expansion": "default",
+ "source_scheme": "*",
+ "source_context_list": "*",
+ "delivery_type": "*",
+ "delivery_value": "same-origin",
+ "redirection": "*",
+ "origin": [
+ "cross-http",
+ "cross-https"
+ ],
+ "subresource": "*",
+ "expectation": "omitted"
+ }
+ ]
+ },
+ {
+ // origin-when-cross-origin
+ "title": "Referrer Policy is set to 'origin-when-cross-origin'",
+ "description": "Check that cross-origin subresources get the origin portion of the referrer URL and same-origin get the stripped referrer URL.",
+ "specification_url": "https://w3c.github.io/webappsec-referrer-policy/#referrer-policy-origin-when-cross-origin",
+ "test_expansion": [
+ {
+ // same-origin-insecure
+ "expansion": "default",
+ "source_scheme": "http",
+ "source_context_list": "*",
+ "delivery_type": "*",
+ "delivery_value": "origin-when-cross-origin",
+ "redirection": "*",
+ "origin": "same-http",
+ "subresource": "*",
+ "expectation": "stripped-referrer"
+ },
+ {
+ // same-origin-secure-default
+ "expansion": "default",
+ "source_scheme": "https",
+ "source_context_list": "*",
+ "delivery_type": "*",
+ "delivery_value": "origin-when-cross-origin",
+ "redirection": "*",
+ "origin": "same-https",
+ "subresource": "*",
+ "expectation": "stripped-referrer"
+ },
+ {
+ // same-origin-upgrade
+ "expansion": "default",
+ "source_scheme": "http",
+ "source_context_list": "*",
+ "delivery_type": "*",
+ "delivery_value": "origin-when-cross-origin",
+ "redirection": "*",
+ "origin": "same-https",
+ "subresource": "*",
+ "expectation": "origin"
+ },
+ {
+ // same-origin-downgrade
+ "expansion": "default",
+ "source_scheme": "https",
+ "source_context_list": "*",
+ "delivery_type": "*",
+ "delivery_value": "origin-when-cross-origin",
+ "redirection": "*",
+ "origin": "same-http",
+ "subresource": "*",
+ "expectation": "origin"
+ },
+ {
+ // same-origin-insecure
+ "expansion": "override",
+ "source_scheme": "*",
+ "source_context_list": "*",
+ "delivery_type": "*",
+ "delivery_value": "origin-when-cross-origin",
+ "redirection": "swap-origin",
+ "origin": [
+ "same-http",
+ "same-https"
+ ],
+ "subresource": "*",
+ "expectation": "origin"
+ },
+ {
+ // cross-origin
+ "expansion": "default",
+ "source_scheme": "*",
+ "source_context_list": "*",
+ "delivery_type": "*",
+ "delivery_value": "origin-when-cross-origin",
+ "redirection": "*",
+ "origin": [
+ "cross-http",
+ "cross-https"
+ ],
+ "subresource": "*",
+ "expectation": "origin"
+ }
+ ]
+ },
+ {
+ // meta tag origin-when-crossorigin
+ "title": "<meta rel=referrer> is set to the legacy value 'origin-when-crossorigin'",
+ "description": "Check that the legacy <meta> value 'origin-when-crossorigin' is equivalent to the 'origin-when-cross-origin' policy",
+ "specification_url": "https://html.spec.whatwg.org/multipage/semantics.html#the-meta-element",
+ "test_expansion": [
+ {
+ // same-origin-insecure
+ "expansion": "default",
+ "source_scheme": "http",
+ "source_context_list": "*",
+ "delivery_type": "meta",
+ "delivery_value": "origin-when-crossorigin",
+ "redirection": "*",
+ "origin": "same-http",
+ "subresource": "*",
+ "expectation": "stripped-referrer"
+ },
+ {
+ // same-origin-secure-default
+ "expansion": "default",
+ "source_scheme": "https",
+ "source_context_list": "*",
+ "delivery_type": "meta",
+ "delivery_value": "origin-when-crossorigin",
+ "redirection": "*",
+ "origin": "same-https",
+ "subresource": "*",
+ "expectation": "stripped-referrer"
+ },
+ {
+ // same-origin-upgrade
+ "expansion": "default",
+ "source_scheme": "http",
+ "source_context_list": "*",
+ "delivery_type": "meta",
+ "delivery_value": "origin-when-crossorigin",
+ "redirection": "*",
+ "origin": "same-https",
+ "subresource": "*",
+ "expectation": "origin"
+ },
+ {
+ // same-origin-downgrade
+ "expansion": "default",
+ "source_scheme": "https",
+ "source_context_list": "*",
+ "delivery_type": "meta",
+ "delivery_value": "origin-when-crossorigin",
+ "redirection": "*",
+ "origin": "same-http",
+ "subresource": "*",
+ "expectation": "origin"
+ },
+ {
+ // same-origin-insecure
+ "expansion": "override",
+ "source_scheme": "*",
+ "source_context_list": "*",
+ "delivery_type": "meta",
+ "delivery_value": "origin-when-crossorigin",
+ "redirection": "swap-origin",
+ "origin": [
+ "same-http",
+ "same-https"
+ ],
+ "subresource": "*",
+ "expectation": "origin"
+ },
+ {
+ // cross-origin
+ "expansion": "default",
+ "source_scheme": "*",
+ "source_context_list": "*",
+ "delivery_type": "meta",
+ "delivery_value": "origin-when-crossorigin",
+ "redirection": "*",
+ "origin": [
+ "cross-http",
+ "cross-https"
+ ],
+ "subresource": "*",
+ "expectation": "origin"
+ }
+ ]
+ },
+ {
+ // strict-origin
+ "title": "Referrer Policy is set to 'strict-origin'",
+ "description": "Check that non a priori insecure subresource gets only the origin portion of the referrer URL. A priori insecure subresource gets no referrer information.",
+ "specification_url": "https://w3c.github.io/webappsec-referrer-policy/#referrer-policy-strict-origin",
+ "test_expansion": [
+ {
+ // insecure-protocol
+ "expansion": "default",
+ "source_scheme": "http",
+ "source_context_list": "*",
+ "delivery_type": "*",
+ "delivery_value": "strict-origin",
+ "redirection": "*",
+ "origin": [
+ "same-http",
+ "cross-http"
+ ],
+ "subresource": "*",
+ "expectation": "origin"
+ },
+ {
+ // upgrade-protocol
+ "expansion": "default",
+ "source_scheme": "http",
+ "source_context_list": "*",
+ "delivery_type": "*",
+ "delivery_value": "strict-origin",
+ "redirection": "*",
+ "origin": [
+ "same-https",
+ "cross-https"
+ ],
+ "subresource": "*",
+ "expectation": "origin"
+ },
+ {
+ // downgrade-protocol
+ "expansion": "default",
+ "source_scheme": "https",
+ "source_context_list": "*",
+ "delivery_type": "*",
+ "delivery_value": "strict-origin",
+ "redirection": "*",
+ "origin": [
+ "same-http",
+ "cross-http"
+ ],
+ "subresource": "*",
+ "expectation": "omitted"
+ },
+ {
+ // secure-protocol
+ "expansion": "default",
+ "source_scheme": "https",
+ "source_context_list": "*",
+ "delivery_type": "*",
+ "delivery_value": "strict-origin",
+ "redirection": "*",
+ "origin": [
+ "same-https",
+ "cross-https"
+ ],
+ "subresource": "*",
+ "expectation": "origin"
+ }
+ ]
+ },
+ {
+ // strict-origin-when-cross-origin
+ "title": "Referrer Policy is set to 'strict-origin-when-cross-origin'",
+ "description": "Check that a priori insecure subresource gets no referrer information. Otherwise, cross-origin subresources get the origin portion of the referrer URL and same-origin get the stripped referrer URL.",
+ "specification_url": "https://w3c.github.io/webappsec-referrer-policy/#referrer-policy-strict-origin-when-cross-origin",
+ "test_expansion": [
+ {
+ // same-insecure
+ "expansion": "default",
+ "source_scheme": "http",
+ "source_context_list": "*",
+ "delivery_type": "*",
+ "delivery_value": "strict-origin-when-cross-origin",
+ "redirection": "*",
+ "origin": "same-http",
+ "subresource": "*",
+ "expectation": "stripped-referrer"
+ },
+ {
+ // same-insecure
+ "expansion": "override",
+ "source_scheme": "http",
+ "source_context_list": "*",
+ "delivery_type": "*",
+ "delivery_value": "strict-origin-when-cross-origin",
+ "redirection": "swap-origin",
+ "origin": "same-http",
+ "subresource": "*",
+ "expectation": "origin"
+ },
+ {
+ // cross-insecure
+ "expansion": "default",
+ "source_scheme": "http",
+ "source_context_list": "*",
+ "delivery_type": "*",
+ "delivery_value": "strict-origin-when-cross-origin",
+ "redirection": "*",
+ "origin": "cross-http",
+ "subresource": "*",
+ "expectation": "origin"
+ },
+ {
+ // upgrade-protocol
+ "expansion": "default",
+ "source_scheme": "http",
+ "source_context_list": "*",
+ "delivery_type": "*",
+ "delivery_value": "strict-origin-when-cross-origin",
+ "redirection": "*",
+ "origin": [
+ "same-https",
+ "cross-https"
+ ],
+ "subresource": "*",
+ "expectation": "origin"
+ },
+ {
+ // downgrade-protocol
+ "expansion": "default",
+ "source_scheme": "https",
+ "source_context_list": "*",
+ "delivery_type": "*",
+ "delivery_value": "strict-origin-when-cross-origin",
+ "redirection": "*",
+ "origin": [
+ "same-http",
+ "cross-http"
+ ],
+ "subresource": "*",
+ "expectation": "omitted"
+ },
+ {
+ // same-secure
+ "expansion": "default",
+ "source_scheme": "https",
+ "source_context_list": "*",
+ "delivery_type": "*",
+ "delivery_value": "strict-origin-when-cross-origin",
+ "redirection": "*",
+ "origin": "same-https",
+ "subresource": "*",
+ "expectation": "stripped-referrer"
+ },
+ {
+ // same-secure
+ "expansion": "override",
+ "source_scheme": "https",
+ "source_context_list": "*",
+ "delivery_type": "*",
+ "delivery_value": "strict-origin-when-cross-origin",
+ "redirection": "swap-origin",
+ "origin": "same-https",
+ "subresource": "*",
+ "expectation": "origin"
+ },
+ {
+ // cross-secure
+ "expansion": "default",
+ "source_scheme": "https",
+ "source_context_list": "*",
+ "delivery_type": "*",
+ "delivery_value": "strict-origin-when-cross-origin",
+ "redirection": "*",
+ "origin": "cross-https",
+ "subresource": "*",
+ "expectation": "origin"
+ }
+ ]
+ },
+ {
+ // unsafe-url
+ "title": "Referrer Policy is set to 'unsafe-url'",
+ "description": "Check that all sub-resources get the stripped referrer URL.",
+ "specification_url": "https://w3c.github.io/webappsec-referrer-policy/#referrer-policy-unsafe-url",
+ "test_expansion": [
+ {
+ // generic
+ "expansion": "default",
+ "source_scheme": "*",
+ "source_context_list": "*",
+ "delivery_type": "*",
+ "delivery_value": "unsafe-url",
+ "redirection": "*",
+ "origin": "*",
+ "subresource": "*",
+ "expectation": "stripped-referrer"
+ }
+ ]
+ },
+ {
+ // meta tag always
+ "title": "<meta rel=referrer> is set to the legacy value 'always'",
+ "description": "Check that the legacy <meta> value 'always' is equivalent to the 'unsafe-url' policy",
+ "specification_url": "https://html.spec.whatwg.org/multipage/semantics.html#the-meta-element",
+ "test_expansion": [
+ {
+ // generic
+ "expansion": "default",
+ "source_scheme": "*",
+ "source_context_list": "*",
+ "delivery_type": "meta",
+ "delivery_value": "always",
+ "redirection": "*",
+ "origin": "*",
+ "subresource": "*",
+ "expectation": "stripped-referrer"
+ }
+ ]
+ }
+ ],
+ "delivery_key": "referrerPolicy",
+ "excluded_tests": [
+ {
+ // upgraded-protocol-workers
+ "expansion": "*",
+ "source_scheme": "http",
+ "source_context_list": "*",
+ "delivery_type": "*",
+ "delivery_value": "*",
+ "redirection": "*",
+ "origin": [
+ "same-https",
+ "cross-https"
+ ],
+ "subresource": [
+ "worker-classic",
+ "worker-module",
+ "sharedworker-classic",
+ "sharedworker-module"
+ ],
+ "expectation": "*"
+ },
+ {
+ // mixed-content-insecure-subresources
+ "expansion": "*",
+ "source_scheme": "https",
+ "source_context_list": "*",
+ "delivery_type": "*",
+ "delivery_value": "*",
+ "redirection": "*",
+ "origin": [
+ "same-http",
+ "same-http-downgrade",
+ "cross-http",
+ "cross-http-downgrade",
+ "same-ws",
+ "same-ws-downgrade",
+ "cross-ws",
+ "cross-ws-downgrade"
+ ],
+ "subresource": "*",
+ "expectation": "*"
+ },
+ {
+ // overhead-for-redirection
+ "expansion": "*",
+ "source_scheme": "*",
+ "source_context_list": "*",
+ "delivery_type": "*",
+ "delivery_value": "*",
+ "redirection": [
+ "keep-origin",
+ "swap-origin"
+ ],
+ "origin": "*",
+ "subresource": [
+ "a-tag",
+ "area-tag"
+ ],
+ "expectation": "*"
+ },
+ {
+ // source-https-unsupported-by-web-platform-tests-runners
+ "expansion": "*",
+ "source_scheme": "https",
+ "source_context_list": "*",
+ "delivery_type": "*",
+ "delivery_value": "*",
+ "redirection": "*",
+ "origin": "*",
+ "subresource": "*",
+ "expectation": "*"
+ },
+ {
+ // <link rel=noreferrer>'s delivery_value should be no-referrer
+ "expansion": "*",
+ "source_scheme": "*",
+ "source_context_list": "*",
+ "delivery_type": "rel-noref",
+ "delivery_value": [
+ null,
+ "no-referrer-when-downgrade",
+ "same-origin",
+ "origin",
+ "origin-when-cross-origin",
+ "strict-origin",
+ "strict-origin-when-cross-origin",
+ "unsafe-url"
+ ],
+ "redirection": "*",
+ "origin": "*",
+ "subresource": "*",
+ "expectation": "*"
+ },
+ {
+ // redirections that referrer-policy tests don't care
+ "expansion": "*",
+ "source_scheme": "*",
+ "source_context_list": "*",
+ "delivery_type": "*",
+ "delivery_value": "*",
+ "redirection": [
+ "keep-scheme",
+ "swap-scheme",
+ "downgrade"
+ ],
+ "origin": "*",
+ "subresource": "*",
+ "expectation": "*"
+ },
+ {
+ // origins that referrer-policy tests don't care
+ "expansion": "*",
+ "source_scheme": "*",
+ "source_context_list": "*",
+ "delivery_type": "*",
+ "delivery_value": "*",
+ "redirection": "*",
+ "origin": [
+ "same-http-downgrade",
+ "cross-http-downgrade",
+ "same-ws-downgrade",
+ "cross-ws-downgrade"
+ ],
+ "subresource": "*",
+ "expectation": "*"
+ },
+ {
+ // subresource values not yet tested
+ "expansion": "*",
+ "source_scheme": "*",
+ "source_context_list": "*",
+ "delivery_type": "*",
+ "delivery_value": "*",
+ "redirection": "*",
+ "subresource": [
+ "area-tag",
+ "audio-tag",
+ "beacon",
+ "link-css-tag",
+ "link-prefetch-tag",
+ "object-tag",
+ "picture-tag",
+ "sharedworker-import",
+ "sharedworker-import-data",
+ "video-tag",
+ "websocket",
+ "worker-import",
+ "worker-import-data",
+ "worklet-animation",
+ "worklet-animation-import-data",
+ "worklet-audio",
+ "worklet-audio-import-data",
+ "worklet-layout",
+ "worklet-layout-import-data",
+ "worklet-paint",
+ "worklet-paint-import-data"
+ ],
+ "origin": "*",
+ "expectation": "*"
+ },
+ {
+ // source_context_list values not yet tested
+ "expansion": "*",
+ "source_scheme": "*",
+ "source_context_list": [
+ "iframe-blank-inherit",
+ "sharedworker-classic",
+ "sharedworker-classic-data",
+ "sharedworker-module",
+ "sharedworker-module-data",
+ "worker-classic-data",
+ "worker-module-data"
+ ],
+ "delivery_type": "*",
+ "delivery_value": "*",
+ "redirection": "*",
+ "subresource": "*",
+ "origin": "*",
+ "expectation": "*"
+ },
+ // Skip some nested source_context_lists for faster tests.
+ {
+ "expansion": "*",
+ "source_scheme": "*",
+ "source_context_list": [
+ "iframe",
+ "srcdoc",
+ "srcdoc-inherit"
+ ],
+ "delivery_type": "*",
+ "delivery_value": "*",
+ "redirection": "*",
+ "subresource": "script-tag-dynamic-import",
+ "origin": "*",
+ "expectation": "*"
+ },
+ ],
+ "source_context_schema": {
+ "supported_delivery_type": {
+ "top": [
+ "meta",
+ "http-rp"
+ ],
+ "iframe": [
+ "meta",
+ "http-rp"
+ ],
+ "iframe-blank": [
+ "meta"
+ ],
+ "srcdoc": [
+ "meta"
+ ],
+ "worker-classic": [
+ "http-rp"
+ ],
+ "worker-module": [
+ "http-rp"
+ ],
+ "worker-classic-data": [],
+ "worker-module-data": [],
+ "sharedworker-classic": [
+ "http-rp"
+ ],
+ "sharedworker-module": [
+ "http-rp"
+ ],
+ "sharedworker-classic-data": [],
+ "sharedworker-module-data": []
+ }
+ },
+ "subresource_schema": {
+ "supported_delivery_type": {
+ // List of elements that support "attr" delivery type can be followed
+ // from the cross reference of:
+ // https://html.spec.whatwg.org/C/#referrer-policy-attribute
+ "a-tag": [
+ "attr",
+ "rel-noref"
+ ],
+ "area-tag": [
+ "attr"
+ ],
+ "audio-tag": [],
+ "beacon": [],
+ // Fetch API supports `init["referrerPolicy"]` in `Request`:
+ // https://fetch.spec.whatwg.org/#dom-request.
+ // TODO(https://github.com/web-platform-tests/wpt/issues/21815):
+ // Add support for this. Currently `common.sub.js` doesn't support this.
+ "fetch": [],
+ "iframe-tag": [
+ "attr"
+ ],
+ "img-tag": [
+ "attr"
+ ],
+ // TODO(https://github.com/web-platform-tests/wpt/issues/21815):
+ // Support "attr" in the following `<link>`-related subresources.
+ // The current referrrer-policy test helper doesn't support
+ // checking referrer results via <link> elements.
+ "link-css-tag": [],
+ "link-prefetch-tag": [],
+ "object-tag": [],
+ // `<img>` supports referrerpolicy attribute,
+ // so `<img>` inside `<picture>` also supports the attribute.
+ // TODO(https://github.com/web-platform-tests/wpt/issues/21815):
+ // Support this.
+ "picture-tag": [],
+ "script-tag": [
+ "attr"
+ ],
+ "script-tag-dynamic-import": [
+ // The policy set to the <script referrerpolicy> attribute is used for
+ // dynamic imports initiated from the script, passed as referencing
+ // script's fetch options.
+ // https://html.spec.whatwg.org/multipage/webappapis.html#hostimportmoduledynamically(referencingscriptormodule,-modulerequest,-promisecapability)
+ "attr"
+ ],
+ "sharedworker-classic": [],
+ "sharedworker-import": [],
+ "sharedworker-import-data": [],
+ "sharedworker-module": [],
+ "video-tag": [],
+ "websocket": [],
+ "worker-classic": [],
+ "worker-import": [],
+ "worker-import-data": [],
+ "worker-module": [],
+ "worklet-animation": [],
+ "worklet-animation-import-data": [],
+ "worklet-audio": [],
+ "worklet-audio-import-data": [],
+ "worklet-layout": [],
+ "worklet-layout-import-data": [],
+ "worklet-paint": [],
+ "worklet-paint-import-data": [],
+ "xhr": []
+ }
+ },
+ "test_expansion_schema": {
+ "delivery_type": [
+ "attr",
+ "rel-noref",
+ "http-rp",
+ "meta"
+ ],
+ "delivery_value": [
+ null,
+ "no-referrer",
+ "no-referrer-when-downgrade",
+ "same-origin",
+ "origin",
+ "origin-when-cross-origin",
+ "strict-origin",
+ "strict-origin-when-cross-origin",
+ "unsafe-url",
+ "default",
+ "always",
+ "never",
+ "origin-when-crossorigin"
+ ],
+ "expectation": [
+ "omitted",
+ "origin",
+ "stripped-referrer"
+ ]
+ }
+}