summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/referrer-policy/origin
diff options
context:
space:
mode:
authorMatt A. Tobin <mattatobin@localhost.localdomain>2018-02-02 04:16:08 -0500
committerMatt A. Tobin <mattatobin@localhost.localdomain>2018-02-02 04:16:08 -0500
commit5f8de423f190bbb79a62f804151bc24824fa32d8 (patch)
tree10027f336435511475e392454359edea8e25895d /testing/web-platform/tests/referrer-policy/origin
parent49ee0794b5d912db1f95dce6eb52d781dc210db5 (diff)
downloadUXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.gz
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.lz
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.xz
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.zip
Add m-esr52 at 52.6.0
Diffstat (limited to 'testing/web-platform/tests/referrer-policy/origin')
-rw-r--r--testing/web-platform/tests/referrer-policy/origin/attr-referrer/cross-origin/http-http/iframe-tag/generic.keep-origin-redirect.http.html40
-rw-r--r--testing/web-platform/tests/referrer-policy/origin/attr-referrer/cross-origin/http-http/iframe-tag/generic.no-redirect.http.html40
-rw-r--r--testing/web-platform/tests/referrer-policy/origin/attr-referrer/cross-origin/http-http/iframe-tag/generic.swap-origin-redirect.http.html40
-rw-r--r--testing/web-platform/tests/referrer-policy/origin/attr-referrer/cross-origin/http-http/img-tag/generic.keep-origin-redirect.http.html40
-rw-r--r--testing/web-platform/tests/referrer-policy/origin/attr-referrer/cross-origin/http-http/img-tag/generic.no-redirect.http.html40
-rw-r--r--testing/web-platform/tests/referrer-policy/origin/attr-referrer/cross-origin/http-http/img-tag/generic.swap-origin-redirect.http.html40
-rw-r--r--testing/web-platform/tests/referrer-policy/origin/attr-referrer/cross-origin/http-https/iframe-tag/generic.keep-origin-redirect.http.html40
-rw-r--r--testing/web-platform/tests/referrer-policy/origin/attr-referrer/cross-origin/http-https/iframe-tag/generic.no-redirect.http.html40
-rw-r--r--testing/web-platform/tests/referrer-policy/origin/attr-referrer/cross-origin/http-https/iframe-tag/generic.swap-origin-redirect.http.html40
-rw-r--r--testing/web-platform/tests/referrer-policy/origin/attr-referrer/cross-origin/http-https/img-tag/generic.keep-origin-redirect.http.html40
-rw-r--r--testing/web-platform/tests/referrer-policy/origin/attr-referrer/cross-origin/http-https/img-tag/generic.no-redirect.http.html40
-rw-r--r--testing/web-platform/tests/referrer-policy/origin/attr-referrer/cross-origin/http-https/img-tag/generic.swap-origin-redirect.http.html40
-rw-r--r--testing/web-platform/tests/referrer-policy/origin/attr-referrer/same-origin/http-http/iframe-tag/generic.keep-origin-redirect.http.html40
-rw-r--r--testing/web-platform/tests/referrer-policy/origin/attr-referrer/same-origin/http-http/iframe-tag/generic.no-redirect.http.html40
-rw-r--r--testing/web-platform/tests/referrer-policy/origin/attr-referrer/same-origin/http-http/iframe-tag/generic.swap-origin-redirect.http.html40
-rw-r--r--testing/web-platform/tests/referrer-policy/origin/attr-referrer/same-origin/http-http/img-tag/generic.keep-origin-redirect.http.html40
-rw-r--r--testing/web-platform/tests/referrer-policy/origin/attr-referrer/same-origin/http-http/img-tag/generic.no-redirect.http.html40
-rw-r--r--testing/web-platform/tests/referrer-policy/origin/attr-referrer/same-origin/http-http/img-tag/generic.swap-origin-redirect.http.html40
-rw-r--r--testing/web-platform/tests/referrer-policy/origin/attr-referrer/same-origin/http-https/iframe-tag/generic.keep-origin-redirect.http.html40
-rw-r--r--testing/web-platform/tests/referrer-policy/origin/attr-referrer/same-origin/http-https/iframe-tag/generic.no-redirect.http.html40
-rw-r--r--testing/web-platform/tests/referrer-policy/origin/attr-referrer/same-origin/http-https/iframe-tag/generic.swap-origin-redirect.http.html40
-rw-r--r--testing/web-platform/tests/referrer-policy/origin/attr-referrer/same-origin/http-https/img-tag/generic.keep-origin-redirect.http.html40
-rw-r--r--testing/web-platform/tests/referrer-policy/origin/attr-referrer/same-origin/http-https/img-tag/generic.no-redirect.http.html40
-rw-r--r--testing/web-platform/tests/referrer-policy/origin/attr-referrer/same-origin/http-https/img-tag/generic.swap-origin-redirect.http.html40
-rw-r--r--testing/web-platform/tests/referrer-policy/origin/http-rp/cross-origin/http-http/fetch-request/generic.keep-origin-redirect.http.html41
-rw-r--r--testing/web-platform/tests/referrer-policy/origin/http-rp/cross-origin/http-http/fetch-request/generic.keep-origin-redirect.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/origin/http-rp/cross-origin/http-http/fetch-request/generic.no-redirect.http.html41
-rw-r--r--testing/web-platform/tests/referrer-policy/origin/http-rp/cross-origin/http-http/fetch-request/generic.no-redirect.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/origin/http-rp/cross-origin/http-http/fetch-request/generic.swap-origin-redirect.http.html41
-rw-r--r--testing/web-platform/tests/referrer-policy/origin/http-rp/cross-origin/http-http/fetch-request/generic.swap-origin-redirect.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/origin/http-rp/cross-origin/http-http/iframe-tag/generic.keep-origin-redirect.http.html41
-rw-r--r--testing/web-platform/tests/referrer-policy/origin/http-rp/cross-origin/http-http/iframe-tag/generic.keep-origin-redirect.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/origin/http-rp/cross-origin/http-http/iframe-tag/generic.no-redirect.http.html41
-rw-r--r--testing/web-platform/tests/referrer-policy/origin/http-rp/cross-origin/http-http/iframe-tag/generic.no-redirect.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/origin/http-rp/cross-origin/http-http/iframe-tag/generic.swap-origin-redirect.http.html41
-rw-r--r--testing/web-platform/tests/referrer-policy/origin/http-rp/cross-origin/http-http/iframe-tag/generic.swap-origin-redirect.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/origin/http-rp/cross-origin/http-http/img-tag/generic.keep-origin-redirect.http.html41
-rw-r--r--testing/web-platform/tests/referrer-policy/origin/http-rp/cross-origin/http-http/img-tag/generic.keep-origin-redirect.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/origin/http-rp/cross-origin/http-http/img-tag/generic.no-redirect.http.html41
-rw-r--r--testing/web-platform/tests/referrer-policy/origin/http-rp/cross-origin/http-http/img-tag/generic.no-redirect.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/origin/http-rp/cross-origin/http-http/img-tag/generic.swap-origin-redirect.http.html41
-rw-r--r--testing/web-platform/tests/referrer-policy/origin/http-rp/cross-origin/http-http/img-tag/generic.swap-origin-redirect.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/origin/http-rp/cross-origin/http-http/script-tag/generic.keep-origin-redirect.http.html41
-rw-r--r--testing/web-platform/tests/referrer-policy/origin/http-rp/cross-origin/http-http/script-tag/generic.keep-origin-redirect.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/origin/http-rp/cross-origin/http-http/script-tag/generic.no-redirect.http.html41
-rw-r--r--testing/web-platform/tests/referrer-policy/origin/http-rp/cross-origin/http-http/script-tag/generic.no-redirect.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/origin/http-rp/cross-origin/http-http/script-tag/generic.swap-origin-redirect.http.html41
-rw-r--r--testing/web-platform/tests/referrer-policy/origin/http-rp/cross-origin/http-http/script-tag/generic.swap-origin-redirect.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/origin/http-rp/cross-origin/http-http/xhr-request/generic.keep-origin-redirect.http.html41
-rw-r--r--testing/web-platform/tests/referrer-policy/origin/http-rp/cross-origin/http-http/xhr-request/generic.keep-origin-redirect.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/origin/http-rp/cross-origin/http-http/xhr-request/generic.no-redirect.http.html41
-rw-r--r--testing/web-platform/tests/referrer-policy/origin/http-rp/cross-origin/http-http/xhr-request/generic.no-redirect.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/origin/http-rp/cross-origin/http-http/xhr-request/generic.swap-origin-redirect.http.html41
-rw-r--r--testing/web-platform/tests/referrer-policy/origin/http-rp/cross-origin/http-http/xhr-request/generic.swap-origin-redirect.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/origin/http-rp/cross-origin/http-https/fetch-request/generic.keep-origin-redirect.http.html41
-rw-r--r--testing/web-platform/tests/referrer-policy/origin/http-rp/cross-origin/http-https/fetch-request/generic.keep-origin-redirect.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/origin/http-rp/cross-origin/http-https/fetch-request/generic.no-redirect.http.html41
-rw-r--r--testing/web-platform/tests/referrer-policy/origin/http-rp/cross-origin/http-https/fetch-request/generic.no-redirect.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/origin/http-rp/cross-origin/http-https/fetch-request/generic.swap-origin-redirect.http.html41
-rw-r--r--testing/web-platform/tests/referrer-policy/origin/http-rp/cross-origin/http-https/fetch-request/generic.swap-origin-redirect.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/origin/http-rp/cross-origin/http-https/iframe-tag/generic.keep-origin-redirect.http.html41
-rw-r--r--testing/web-platform/tests/referrer-policy/origin/http-rp/cross-origin/http-https/iframe-tag/generic.keep-origin-redirect.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/origin/http-rp/cross-origin/http-https/iframe-tag/generic.no-redirect.http.html41
-rw-r--r--testing/web-platform/tests/referrer-policy/origin/http-rp/cross-origin/http-https/iframe-tag/generic.no-redirect.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/origin/http-rp/cross-origin/http-https/iframe-tag/generic.swap-origin-redirect.http.html41
-rw-r--r--testing/web-platform/tests/referrer-policy/origin/http-rp/cross-origin/http-https/iframe-tag/generic.swap-origin-redirect.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/origin/http-rp/cross-origin/http-https/img-tag/generic.keep-origin-redirect.http.html41
-rw-r--r--testing/web-platform/tests/referrer-policy/origin/http-rp/cross-origin/http-https/img-tag/generic.keep-origin-redirect.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/origin/http-rp/cross-origin/http-https/img-tag/generic.no-redirect.http.html41
-rw-r--r--testing/web-platform/tests/referrer-policy/origin/http-rp/cross-origin/http-https/img-tag/generic.no-redirect.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/origin/http-rp/cross-origin/http-https/img-tag/generic.swap-origin-redirect.http.html41
-rw-r--r--testing/web-platform/tests/referrer-policy/origin/http-rp/cross-origin/http-https/img-tag/generic.swap-origin-redirect.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/origin/http-rp/cross-origin/http-https/script-tag/generic.keep-origin-redirect.http.html41
-rw-r--r--testing/web-platform/tests/referrer-policy/origin/http-rp/cross-origin/http-https/script-tag/generic.keep-origin-redirect.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/origin/http-rp/cross-origin/http-https/script-tag/generic.no-redirect.http.html41
-rw-r--r--testing/web-platform/tests/referrer-policy/origin/http-rp/cross-origin/http-https/script-tag/generic.no-redirect.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/origin/http-rp/cross-origin/http-https/script-tag/generic.swap-origin-redirect.http.html41
-rw-r--r--testing/web-platform/tests/referrer-policy/origin/http-rp/cross-origin/http-https/script-tag/generic.swap-origin-redirect.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/origin/http-rp/cross-origin/http-https/xhr-request/generic.keep-origin-redirect.http.html41
-rw-r--r--testing/web-platform/tests/referrer-policy/origin/http-rp/cross-origin/http-https/xhr-request/generic.keep-origin-redirect.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/origin/http-rp/cross-origin/http-https/xhr-request/generic.no-redirect.http.html41
-rw-r--r--testing/web-platform/tests/referrer-policy/origin/http-rp/cross-origin/http-https/xhr-request/generic.no-redirect.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/origin/http-rp/cross-origin/http-https/xhr-request/generic.swap-origin-redirect.http.html41
-rw-r--r--testing/web-platform/tests/referrer-policy/origin/http-rp/cross-origin/http-https/xhr-request/generic.swap-origin-redirect.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/origin/http-rp/same-origin/http-http/fetch-request/generic.keep-origin-redirect.http.html41
-rw-r--r--testing/web-platform/tests/referrer-policy/origin/http-rp/same-origin/http-http/fetch-request/generic.keep-origin-redirect.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/origin/http-rp/same-origin/http-http/fetch-request/generic.no-redirect.http.html41
-rw-r--r--testing/web-platform/tests/referrer-policy/origin/http-rp/same-origin/http-http/fetch-request/generic.no-redirect.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/origin/http-rp/same-origin/http-http/fetch-request/generic.swap-origin-redirect.http.html41
-rw-r--r--testing/web-platform/tests/referrer-policy/origin/http-rp/same-origin/http-http/fetch-request/generic.swap-origin-redirect.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/origin/http-rp/same-origin/http-http/iframe-tag/generic.keep-origin-redirect.http.html41
-rw-r--r--testing/web-platform/tests/referrer-policy/origin/http-rp/same-origin/http-http/iframe-tag/generic.keep-origin-redirect.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/origin/http-rp/same-origin/http-http/iframe-tag/generic.no-redirect.http.html41
-rw-r--r--testing/web-platform/tests/referrer-policy/origin/http-rp/same-origin/http-http/iframe-tag/generic.no-redirect.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/origin/http-rp/same-origin/http-http/iframe-tag/generic.swap-origin-redirect.http.html41
-rw-r--r--testing/web-platform/tests/referrer-policy/origin/http-rp/same-origin/http-http/iframe-tag/generic.swap-origin-redirect.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/origin/http-rp/same-origin/http-http/img-tag/generic.keep-origin-redirect.http.html41
-rw-r--r--testing/web-platform/tests/referrer-policy/origin/http-rp/same-origin/http-http/img-tag/generic.keep-origin-redirect.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/origin/http-rp/same-origin/http-http/img-tag/generic.no-redirect.http.html41
-rw-r--r--testing/web-platform/tests/referrer-policy/origin/http-rp/same-origin/http-http/img-tag/generic.no-redirect.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/origin/http-rp/same-origin/http-http/img-tag/generic.swap-origin-redirect.http.html41
-rw-r--r--testing/web-platform/tests/referrer-policy/origin/http-rp/same-origin/http-http/img-tag/generic.swap-origin-redirect.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/origin/http-rp/same-origin/http-http/script-tag/generic.keep-origin-redirect.http.html41
-rw-r--r--testing/web-platform/tests/referrer-policy/origin/http-rp/same-origin/http-http/script-tag/generic.keep-origin-redirect.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/origin/http-rp/same-origin/http-http/script-tag/generic.no-redirect.http.html41
-rw-r--r--testing/web-platform/tests/referrer-policy/origin/http-rp/same-origin/http-http/script-tag/generic.no-redirect.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/origin/http-rp/same-origin/http-http/script-tag/generic.swap-origin-redirect.http.html41
-rw-r--r--testing/web-platform/tests/referrer-policy/origin/http-rp/same-origin/http-http/script-tag/generic.swap-origin-redirect.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/origin/http-rp/same-origin/http-http/xhr-request/generic.keep-origin-redirect.http.html41
-rw-r--r--testing/web-platform/tests/referrer-policy/origin/http-rp/same-origin/http-http/xhr-request/generic.keep-origin-redirect.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/origin/http-rp/same-origin/http-http/xhr-request/generic.no-redirect.http.html41
-rw-r--r--testing/web-platform/tests/referrer-policy/origin/http-rp/same-origin/http-http/xhr-request/generic.no-redirect.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/origin/http-rp/same-origin/http-http/xhr-request/generic.swap-origin-redirect.http.html41
-rw-r--r--testing/web-platform/tests/referrer-policy/origin/http-rp/same-origin/http-http/xhr-request/generic.swap-origin-redirect.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/origin/http-rp/same-origin/http-https/fetch-request/generic.keep-origin-redirect.http.html41
-rw-r--r--testing/web-platform/tests/referrer-policy/origin/http-rp/same-origin/http-https/fetch-request/generic.keep-origin-redirect.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/origin/http-rp/same-origin/http-https/fetch-request/generic.no-redirect.http.html41
-rw-r--r--testing/web-platform/tests/referrer-policy/origin/http-rp/same-origin/http-https/fetch-request/generic.no-redirect.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/origin/http-rp/same-origin/http-https/fetch-request/generic.swap-origin-redirect.http.html41
-rw-r--r--testing/web-platform/tests/referrer-policy/origin/http-rp/same-origin/http-https/fetch-request/generic.swap-origin-redirect.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/origin/http-rp/same-origin/http-https/iframe-tag/generic.keep-origin-redirect.http.html41
-rw-r--r--testing/web-platform/tests/referrer-policy/origin/http-rp/same-origin/http-https/iframe-tag/generic.keep-origin-redirect.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/origin/http-rp/same-origin/http-https/iframe-tag/generic.no-redirect.http.html41
-rw-r--r--testing/web-platform/tests/referrer-policy/origin/http-rp/same-origin/http-https/iframe-tag/generic.no-redirect.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/origin/http-rp/same-origin/http-https/iframe-tag/generic.swap-origin-redirect.http.html41
-rw-r--r--testing/web-platform/tests/referrer-policy/origin/http-rp/same-origin/http-https/iframe-tag/generic.swap-origin-redirect.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/origin/http-rp/same-origin/http-https/img-tag/generic.keep-origin-redirect.http.html41
-rw-r--r--testing/web-platform/tests/referrer-policy/origin/http-rp/same-origin/http-https/img-tag/generic.keep-origin-redirect.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/origin/http-rp/same-origin/http-https/img-tag/generic.no-redirect.http.html41
-rw-r--r--testing/web-platform/tests/referrer-policy/origin/http-rp/same-origin/http-https/img-tag/generic.no-redirect.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/origin/http-rp/same-origin/http-https/img-tag/generic.swap-origin-redirect.http.html41
-rw-r--r--testing/web-platform/tests/referrer-policy/origin/http-rp/same-origin/http-https/img-tag/generic.swap-origin-redirect.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/origin/http-rp/same-origin/http-https/script-tag/generic.keep-origin-redirect.http.html41
-rw-r--r--testing/web-platform/tests/referrer-policy/origin/http-rp/same-origin/http-https/script-tag/generic.keep-origin-redirect.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/origin/http-rp/same-origin/http-https/script-tag/generic.no-redirect.http.html41
-rw-r--r--testing/web-platform/tests/referrer-policy/origin/http-rp/same-origin/http-https/script-tag/generic.no-redirect.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/origin/http-rp/same-origin/http-https/script-tag/generic.swap-origin-redirect.http.html41
-rw-r--r--testing/web-platform/tests/referrer-policy/origin/http-rp/same-origin/http-https/script-tag/generic.swap-origin-redirect.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/origin/http-rp/same-origin/http-https/xhr-request/generic.keep-origin-redirect.http.html41
-rw-r--r--testing/web-platform/tests/referrer-policy/origin/http-rp/same-origin/http-https/xhr-request/generic.keep-origin-redirect.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/origin/http-rp/same-origin/http-https/xhr-request/generic.no-redirect.http.html41
-rw-r--r--testing/web-platform/tests/referrer-policy/origin/http-rp/same-origin/http-https/xhr-request/generic.no-redirect.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/origin/http-rp/same-origin/http-https/xhr-request/generic.swap-origin-redirect.http.html41
-rw-r--r--testing/web-platform/tests/referrer-policy/origin/http-rp/same-origin/http-https/xhr-request/generic.swap-origin-redirect.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/origin/meta-referrer/cross-origin/http-http/fetch-request/generic.keep-origin-redirect.http.html41
-rw-r--r--testing/web-platform/tests/referrer-policy/origin/meta-referrer/cross-origin/http-http/fetch-request/generic.no-redirect.http.html41
-rw-r--r--testing/web-platform/tests/referrer-policy/origin/meta-referrer/cross-origin/http-http/fetch-request/generic.swap-origin-redirect.http.html41
-rw-r--r--testing/web-platform/tests/referrer-policy/origin/meta-referrer/cross-origin/http-http/iframe-tag/generic.keep-origin-redirect.http.html41
-rw-r--r--testing/web-platform/tests/referrer-policy/origin/meta-referrer/cross-origin/http-http/iframe-tag/generic.no-redirect.http.html41
-rw-r--r--testing/web-platform/tests/referrer-policy/origin/meta-referrer/cross-origin/http-http/iframe-tag/generic.swap-origin-redirect.http.html41
-rw-r--r--testing/web-platform/tests/referrer-policy/origin/meta-referrer/cross-origin/http-http/img-tag/generic.keep-origin-redirect.http.html41
-rw-r--r--testing/web-platform/tests/referrer-policy/origin/meta-referrer/cross-origin/http-http/img-tag/generic.no-redirect.http.html41
-rw-r--r--testing/web-platform/tests/referrer-policy/origin/meta-referrer/cross-origin/http-http/img-tag/generic.swap-origin-redirect.http.html41
-rw-r--r--testing/web-platform/tests/referrer-policy/origin/meta-referrer/cross-origin/http-http/script-tag/generic.keep-origin-redirect.http.html41
-rw-r--r--testing/web-platform/tests/referrer-policy/origin/meta-referrer/cross-origin/http-http/script-tag/generic.no-redirect.http.html41
-rw-r--r--testing/web-platform/tests/referrer-policy/origin/meta-referrer/cross-origin/http-http/script-tag/generic.swap-origin-redirect.http.html41
-rw-r--r--testing/web-platform/tests/referrer-policy/origin/meta-referrer/cross-origin/http-http/xhr-request/generic.keep-origin-redirect.http.html41
-rw-r--r--testing/web-platform/tests/referrer-policy/origin/meta-referrer/cross-origin/http-http/xhr-request/generic.no-redirect.http.html41
-rw-r--r--testing/web-platform/tests/referrer-policy/origin/meta-referrer/cross-origin/http-http/xhr-request/generic.swap-origin-redirect.http.html41
-rw-r--r--testing/web-platform/tests/referrer-policy/origin/meta-referrer/cross-origin/http-https/fetch-request/generic.keep-origin-redirect.http.html41
-rw-r--r--testing/web-platform/tests/referrer-policy/origin/meta-referrer/cross-origin/http-https/fetch-request/generic.no-redirect.http.html41
-rw-r--r--testing/web-platform/tests/referrer-policy/origin/meta-referrer/cross-origin/http-https/fetch-request/generic.swap-origin-redirect.http.html41
-rw-r--r--testing/web-platform/tests/referrer-policy/origin/meta-referrer/cross-origin/http-https/iframe-tag/generic.keep-origin-redirect.http.html41
-rw-r--r--testing/web-platform/tests/referrer-policy/origin/meta-referrer/cross-origin/http-https/iframe-tag/generic.no-redirect.http.html41
-rw-r--r--testing/web-platform/tests/referrer-policy/origin/meta-referrer/cross-origin/http-https/iframe-tag/generic.swap-origin-redirect.http.html41
-rw-r--r--testing/web-platform/tests/referrer-policy/origin/meta-referrer/cross-origin/http-https/img-tag/generic.keep-origin-redirect.http.html41
-rw-r--r--testing/web-platform/tests/referrer-policy/origin/meta-referrer/cross-origin/http-https/img-tag/generic.no-redirect.http.html41
-rw-r--r--testing/web-platform/tests/referrer-policy/origin/meta-referrer/cross-origin/http-https/img-tag/generic.swap-origin-redirect.http.html41
-rw-r--r--testing/web-platform/tests/referrer-policy/origin/meta-referrer/cross-origin/http-https/script-tag/generic.keep-origin-redirect.http.html41
-rw-r--r--testing/web-platform/tests/referrer-policy/origin/meta-referrer/cross-origin/http-https/script-tag/generic.no-redirect.http.html41
-rw-r--r--testing/web-platform/tests/referrer-policy/origin/meta-referrer/cross-origin/http-https/script-tag/generic.swap-origin-redirect.http.html41
-rw-r--r--testing/web-platform/tests/referrer-policy/origin/meta-referrer/cross-origin/http-https/xhr-request/generic.keep-origin-redirect.http.html41
-rw-r--r--testing/web-platform/tests/referrer-policy/origin/meta-referrer/cross-origin/http-https/xhr-request/generic.no-redirect.http.html41
-rw-r--r--testing/web-platform/tests/referrer-policy/origin/meta-referrer/cross-origin/http-https/xhr-request/generic.swap-origin-redirect.http.html41
-rw-r--r--testing/web-platform/tests/referrer-policy/origin/meta-referrer/same-origin/http-http/fetch-request/generic.keep-origin-redirect.http.html41
-rw-r--r--testing/web-platform/tests/referrer-policy/origin/meta-referrer/same-origin/http-http/fetch-request/generic.no-redirect.http.html41
-rw-r--r--testing/web-platform/tests/referrer-policy/origin/meta-referrer/same-origin/http-http/fetch-request/generic.swap-origin-redirect.http.html41
-rw-r--r--testing/web-platform/tests/referrer-policy/origin/meta-referrer/same-origin/http-http/iframe-tag/generic.keep-origin-redirect.http.html41
-rw-r--r--testing/web-platform/tests/referrer-policy/origin/meta-referrer/same-origin/http-http/iframe-tag/generic.no-redirect.http.html41
-rw-r--r--testing/web-platform/tests/referrer-policy/origin/meta-referrer/same-origin/http-http/iframe-tag/generic.swap-origin-redirect.http.html41
-rw-r--r--testing/web-platform/tests/referrer-policy/origin/meta-referrer/same-origin/http-http/img-tag/generic.keep-origin-redirect.http.html41
-rw-r--r--testing/web-platform/tests/referrer-policy/origin/meta-referrer/same-origin/http-http/img-tag/generic.no-redirect.http.html41
-rw-r--r--testing/web-platform/tests/referrer-policy/origin/meta-referrer/same-origin/http-http/img-tag/generic.swap-origin-redirect.http.html41
-rw-r--r--testing/web-platform/tests/referrer-policy/origin/meta-referrer/same-origin/http-http/script-tag/generic.keep-origin-redirect.http.html41
-rw-r--r--testing/web-platform/tests/referrer-policy/origin/meta-referrer/same-origin/http-http/script-tag/generic.no-redirect.http.html41
-rw-r--r--testing/web-platform/tests/referrer-policy/origin/meta-referrer/same-origin/http-http/script-tag/generic.swap-origin-redirect.http.html41
-rw-r--r--testing/web-platform/tests/referrer-policy/origin/meta-referrer/same-origin/http-http/xhr-request/generic.keep-origin-redirect.http.html41
-rw-r--r--testing/web-platform/tests/referrer-policy/origin/meta-referrer/same-origin/http-http/xhr-request/generic.no-redirect.http.html41
-rw-r--r--testing/web-platform/tests/referrer-policy/origin/meta-referrer/same-origin/http-http/xhr-request/generic.swap-origin-redirect.http.html41
-rw-r--r--testing/web-platform/tests/referrer-policy/origin/meta-referrer/same-origin/http-https/fetch-request/generic.keep-origin-redirect.http.html41
-rw-r--r--testing/web-platform/tests/referrer-policy/origin/meta-referrer/same-origin/http-https/fetch-request/generic.no-redirect.http.html41
-rw-r--r--testing/web-platform/tests/referrer-policy/origin/meta-referrer/same-origin/http-https/fetch-request/generic.swap-origin-redirect.http.html41
-rw-r--r--testing/web-platform/tests/referrer-policy/origin/meta-referrer/same-origin/http-https/iframe-tag/generic.keep-origin-redirect.http.html41
-rw-r--r--testing/web-platform/tests/referrer-policy/origin/meta-referrer/same-origin/http-https/iframe-tag/generic.no-redirect.http.html41
-rw-r--r--testing/web-platform/tests/referrer-policy/origin/meta-referrer/same-origin/http-https/iframe-tag/generic.swap-origin-redirect.http.html41
-rw-r--r--testing/web-platform/tests/referrer-policy/origin/meta-referrer/same-origin/http-https/img-tag/generic.keep-origin-redirect.http.html41
-rw-r--r--testing/web-platform/tests/referrer-policy/origin/meta-referrer/same-origin/http-https/img-tag/generic.no-redirect.http.html41
-rw-r--r--testing/web-platform/tests/referrer-policy/origin/meta-referrer/same-origin/http-https/img-tag/generic.swap-origin-redirect.http.html41
-rw-r--r--testing/web-platform/tests/referrer-policy/origin/meta-referrer/same-origin/http-https/script-tag/generic.keep-origin-redirect.http.html41
-rw-r--r--testing/web-platform/tests/referrer-policy/origin/meta-referrer/same-origin/http-https/script-tag/generic.no-redirect.http.html41
-rw-r--r--testing/web-platform/tests/referrer-policy/origin/meta-referrer/same-origin/http-https/script-tag/generic.swap-origin-redirect.http.html41
-rw-r--r--testing/web-platform/tests/referrer-policy/origin/meta-referrer/same-origin/http-https/xhr-request/generic.keep-origin-redirect.http.html41
-rw-r--r--testing/web-platform/tests/referrer-policy/origin/meta-referrer/same-origin/http-https/xhr-request/generic.no-redirect.http.html41
-rw-r--r--testing/web-platform/tests/referrer-policy/origin/meta-referrer/same-origin/http-https/xhr-request/generic.swap-origin-redirect.http.html41
204 files changed, 6000 insertions, 0 deletions
diff --git a/testing/web-platform/tests/referrer-policy/origin/attr-referrer/cross-origin/http-http/iframe-tag/generic.keep-origin-redirect.http.html b/testing/web-platform/tests/referrer-policy/origin/attr-referrer/cross-origin/http-http/iframe-tag/generic.keep-origin-redirect.http.html
new file mode 100644
index 000000000..403b08e5d
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/origin/attr-referrer/cross-origin/http-http/iframe-tag/generic.keep-origin-redirect.http.html
@@ -0,0 +1,40 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by referrer-policy/generic/tools/generate.py using referrer-policy/generic/template/test.release.html.template. -->
+<html>
+ <head>
+ <title>Referrer-Policy: Referrer Policy is set to 'origin'</title>
+ <meta name="description" content="Check that all subresources in all casses get only the origin portion of the referrer URL.">
+ <link rel="author" title="Kristijan Burnik" href="burnik@chromium.org">
+ <link rel="help" href="https://w3c.github.io/webappsec-referrer-policy/#referrer-policy-origin">
+ <meta name="assert" content="The referrer URL is origin when a
+ document served over http requires an http
+ sub-resource via iframe-tag using the attr-referrer
+ delivery method with keep-origin-redirect and when
+ the target request is cross-origin.">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <!-- TODO(kristijanburnik): Minify and merge both: -->
+ <script src="/referrer-policy/generic/common.js"></script>
+ <script src="/referrer-policy/generic/referrer-policy-test-case.js?pipe=sub"></script>
+ </head>
+ <body>
+ <script>
+ ReferrerPolicyTestCase(
+ {
+ "referrer_policy": "origin",
+ "delivery_method": "attr-referrer",
+ "redirection": "keep-origin-redirect",
+ "origin": "cross-origin",
+ "source_protocol": "http",
+ "target_protocol": "http",
+ "subresource": "iframe-tag",
+ "subresource_path": "/referrer-policy/generic/subresource/document.py",
+ "referrer_url": "origin"
+ },
+ document.querySelector("meta[name=assert]").content,
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/origin/attr-referrer/cross-origin/http-http/iframe-tag/generic.no-redirect.http.html b/testing/web-platform/tests/referrer-policy/origin/attr-referrer/cross-origin/http-http/iframe-tag/generic.no-redirect.http.html
new file mode 100644
index 000000000..25e9e2f45
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/origin/attr-referrer/cross-origin/http-http/iframe-tag/generic.no-redirect.http.html
@@ -0,0 +1,40 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by referrer-policy/generic/tools/generate.py using referrer-policy/generic/template/test.release.html.template. -->
+<html>
+ <head>
+ <title>Referrer-Policy: Referrer Policy is set to 'origin'</title>
+ <meta name="description" content="Check that all subresources in all casses get only the origin portion of the referrer URL.">
+ <link rel="author" title="Kristijan Burnik" href="burnik@chromium.org">
+ <link rel="help" href="https://w3c.github.io/webappsec-referrer-policy/#referrer-policy-origin">
+ <meta name="assert" content="The referrer URL is origin when a
+ document served over http requires an http
+ sub-resource via iframe-tag using the attr-referrer
+ delivery method with no-redirect and when
+ the target request is cross-origin.">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <!-- TODO(kristijanburnik): Minify and merge both: -->
+ <script src="/referrer-policy/generic/common.js"></script>
+ <script src="/referrer-policy/generic/referrer-policy-test-case.js?pipe=sub"></script>
+ </head>
+ <body>
+ <script>
+ ReferrerPolicyTestCase(
+ {
+ "referrer_policy": "origin",
+ "delivery_method": "attr-referrer",
+ "redirection": "no-redirect",
+ "origin": "cross-origin",
+ "source_protocol": "http",
+ "target_protocol": "http",
+ "subresource": "iframe-tag",
+ "subresource_path": "/referrer-policy/generic/subresource/document.py",
+ "referrer_url": "origin"
+ },
+ document.querySelector("meta[name=assert]").content,
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/origin/attr-referrer/cross-origin/http-http/iframe-tag/generic.swap-origin-redirect.http.html b/testing/web-platform/tests/referrer-policy/origin/attr-referrer/cross-origin/http-http/iframe-tag/generic.swap-origin-redirect.http.html
new file mode 100644
index 000000000..0ae83292f
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/origin/attr-referrer/cross-origin/http-http/iframe-tag/generic.swap-origin-redirect.http.html
@@ -0,0 +1,40 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by referrer-policy/generic/tools/generate.py using referrer-policy/generic/template/test.release.html.template. -->
+<html>
+ <head>
+ <title>Referrer-Policy: Referrer Policy is set to 'origin'</title>
+ <meta name="description" content="Check that all subresources in all casses get only the origin portion of the referrer URL.">
+ <link rel="author" title="Kristijan Burnik" href="burnik@chromium.org">
+ <link rel="help" href="https://w3c.github.io/webappsec-referrer-policy/#referrer-policy-origin">
+ <meta name="assert" content="The referrer URL is origin when a
+ document served over http requires an http
+ sub-resource via iframe-tag using the attr-referrer
+ delivery method with swap-origin-redirect and when
+ the target request is cross-origin.">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <!-- TODO(kristijanburnik): Minify and merge both: -->
+ <script src="/referrer-policy/generic/common.js"></script>
+ <script src="/referrer-policy/generic/referrer-policy-test-case.js?pipe=sub"></script>
+ </head>
+ <body>
+ <script>
+ ReferrerPolicyTestCase(
+ {
+ "referrer_policy": "origin",
+ "delivery_method": "attr-referrer",
+ "redirection": "swap-origin-redirect",
+ "origin": "cross-origin",
+ "source_protocol": "http",
+ "target_protocol": "http",
+ "subresource": "iframe-tag",
+ "subresource_path": "/referrer-policy/generic/subresource/document.py",
+ "referrer_url": "origin"
+ },
+ document.querySelector("meta[name=assert]").content,
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/origin/attr-referrer/cross-origin/http-http/img-tag/generic.keep-origin-redirect.http.html b/testing/web-platform/tests/referrer-policy/origin/attr-referrer/cross-origin/http-http/img-tag/generic.keep-origin-redirect.http.html
new file mode 100644
index 000000000..7358e1c70
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/origin/attr-referrer/cross-origin/http-http/img-tag/generic.keep-origin-redirect.http.html
@@ -0,0 +1,40 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by referrer-policy/generic/tools/generate.py using referrer-policy/generic/template/test.release.html.template. -->
+<html>
+ <head>
+ <title>Referrer-Policy: Referrer Policy is set to 'origin'</title>
+ <meta name="description" content="Check that all subresources in all casses get only the origin portion of the referrer URL.">
+ <link rel="author" title="Kristijan Burnik" href="burnik@chromium.org">
+ <link rel="help" href="https://w3c.github.io/webappsec-referrer-policy/#referrer-policy-origin">
+ <meta name="assert" content="The referrer URL is origin when a
+ document served over http requires an http
+ sub-resource via img-tag using the attr-referrer
+ delivery method with keep-origin-redirect and when
+ the target request is cross-origin.">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <!-- TODO(kristijanburnik): Minify and merge both: -->
+ <script src="/referrer-policy/generic/common.js"></script>
+ <script src="/referrer-policy/generic/referrer-policy-test-case.js?pipe=sub"></script>
+ </head>
+ <body>
+ <script>
+ ReferrerPolicyTestCase(
+ {
+ "referrer_policy": "origin",
+ "delivery_method": "attr-referrer",
+ "redirection": "keep-origin-redirect",
+ "origin": "cross-origin",
+ "source_protocol": "http",
+ "target_protocol": "http",
+ "subresource": "img-tag",
+ "subresource_path": "/referrer-policy/generic/subresource/image.py",
+ "referrer_url": "origin"
+ },
+ document.querySelector("meta[name=assert]").content,
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/origin/attr-referrer/cross-origin/http-http/img-tag/generic.no-redirect.http.html b/testing/web-platform/tests/referrer-policy/origin/attr-referrer/cross-origin/http-http/img-tag/generic.no-redirect.http.html
new file mode 100644
index 000000000..77b87b8cb
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/origin/attr-referrer/cross-origin/http-http/img-tag/generic.no-redirect.http.html
@@ -0,0 +1,40 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by referrer-policy/generic/tools/generate.py using referrer-policy/generic/template/test.release.html.template. -->
+<html>
+ <head>
+ <title>Referrer-Policy: Referrer Policy is set to 'origin'</title>
+ <meta name="description" content="Check that all subresources in all casses get only the origin portion of the referrer URL.">
+ <link rel="author" title="Kristijan Burnik" href="burnik@chromium.org">
+ <link rel="help" href="https://w3c.github.io/webappsec-referrer-policy/#referrer-policy-origin">
+ <meta name="assert" content="The referrer URL is origin when a
+ document served over http requires an http
+ sub-resource via img-tag using the attr-referrer
+ delivery method with no-redirect and when
+ the target request is cross-origin.">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <!-- TODO(kristijanburnik): Minify and merge both: -->
+ <script src="/referrer-policy/generic/common.js"></script>
+ <script src="/referrer-policy/generic/referrer-policy-test-case.js?pipe=sub"></script>
+ </head>
+ <body>
+ <script>
+ ReferrerPolicyTestCase(
+ {
+ "referrer_policy": "origin",
+ "delivery_method": "attr-referrer",
+ "redirection": "no-redirect",
+ "origin": "cross-origin",
+ "source_protocol": "http",
+ "target_protocol": "http",
+ "subresource": "img-tag",
+ "subresource_path": "/referrer-policy/generic/subresource/image.py",
+ "referrer_url": "origin"
+ },
+ document.querySelector("meta[name=assert]").content,
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/origin/attr-referrer/cross-origin/http-http/img-tag/generic.swap-origin-redirect.http.html b/testing/web-platform/tests/referrer-policy/origin/attr-referrer/cross-origin/http-http/img-tag/generic.swap-origin-redirect.http.html
new file mode 100644
index 000000000..e8ba9a759
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/origin/attr-referrer/cross-origin/http-http/img-tag/generic.swap-origin-redirect.http.html
@@ -0,0 +1,40 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by referrer-policy/generic/tools/generate.py using referrer-policy/generic/template/test.release.html.template. -->
+<html>
+ <head>
+ <title>Referrer-Policy: Referrer Policy is set to 'origin'</title>
+ <meta name="description" content="Check that all subresources in all casses get only the origin portion of the referrer URL.">
+ <link rel="author" title="Kristijan Burnik" href="burnik@chromium.org">
+ <link rel="help" href="https://w3c.github.io/webappsec-referrer-policy/#referrer-policy-origin">
+ <meta name="assert" content="The referrer URL is origin when a
+ document served over http requires an http
+ sub-resource via img-tag using the attr-referrer
+ delivery method with swap-origin-redirect and when
+ the target request is cross-origin.">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <!-- TODO(kristijanburnik): Minify and merge both: -->
+ <script src="/referrer-policy/generic/common.js"></script>
+ <script src="/referrer-policy/generic/referrer-policy-test-case.js?pipe=sub"></script>
+ </head>
+ <body>
+ <script>
+ ReferrerPolicyTestCase(
+ {
+ "referrer_policy": "origin",
+ "delivery_method": "attr-referrer",
+ "redirection": "swap-origin-redirect",
+ "origin": "cross-origin",
+ "source_protocol": "http",
+ "target_protocol": "http",
+ "subresource": "img-tag",
+ "subresource_path": "/referrer-policy/generic/subresource/image.py",
+ "referrer_url": "origin"
+ },
+ document.querySelector("meta[name=assert]").content,
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/origin/attr-referrer/cross-origin/http-https/iframe-tag/generic.keep-origin-redirect.http.html b/testing/web-platform/tests/referrer-policy/origin/attr-referrer/cross-origin/http-https/iframe-tag/generic.keep-origin-redirect.http.html
new file mode 100644
index 000000000..5622a50bf
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/origin/attr-referrer/cross-origin/http-https/iframe-tag/generic.keep-origin-redirect.http.html
@@ -0,0 +1,40 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by referrer-policy/generic/tools/generate.py using referrer-policy/generic/template/test.release.html.template. -->
+<html>
+ <head>
+ <title>Referrer-Policy: Referrer Policy is set to 'origin'</title>
+ <meta name="description" content="Check that all subresources in all casses get only the origin portion of the referrer URL.">
+ <link rel="author" title="Kristijan Burnik" href="burnik@chromium.org">
+ <link rel="help" href="https://w3c.github.io/webappsec-referrer-policy/#referrer-policy-origin">
+ <meta name="assert" content="The referrer URL is origin when a
+ document served over http requires an https
+ sub-resource via iframe-tag using the attr-referrer
+ delivery method with keep-origin-redirect and when
+ the target request is cross-origin.">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <!-- TODO(kristijanburnik): Minify and merge both: -->
+ <script src="/referrer-policy/generic/common.js"></script>
+ <script src="/referrer-policy/generic/referrer-policy-test-case.js?pipe=sub"></script>
+ </head>
+ <body>
+ <script>
+ ReferrerPolicyTestCase(
+ {
+ "referrer_policy": "origin",
+ "delivery_method": "attr-referrer",
+ "redirection": "keep-origin-redirect",
+ "origin": "cross-origin",
+ "source_protocol": "http",
+ "target_protocol": "https",
+ "subresource": "iframe-tag",
+ "subresource_path": "/referrer-policy/generic/subresource/document.py",
+ "referrer_url": "origin"
+ },
+ document.querySelector("meta[name=assert]").content,
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/origin/attr-referrer/cross-origin/http-https/iframe-tag/generic.no-redirect.http.html b/testing/web-platform/tests/referrer-policy/origin/attr-referrer/cross-origin/http-https/iframe-tag/generic.no-redirect.http.html
new file mode 100644
index 000000000..dfdf69fbc
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/origin/attr-referrer/cross-origin/http-https/iframe-tag/generic.no-redirect.http.html
@@ -0,0 +1,40 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by referrer-policy/generic/tools/generate.py using referrer-policy/generic/template/test.release.html.template. -->
+<html>
+ <head>
+ <title>Referrer-Policy: Referrer Policy is set to 'origin'</title>
+ <meta name="description" content="Check that all subresources in all casses get only the origin portion of the referrer URL.">
+ <link rel="author" title="Kristijan Burnik" href="burnik@chromium.org">
+ <link rel="help" href="https://w3c.github.io/webappsec-referrer-policy/#referrer-policy-origin">
+ <meta name="assert" content="The referrer URL is origin when a
+ document served over http requires an https
+ sub-resource via iframe-tag using the attr-referrer
+ delivery method with no-redirect and when
+ the target request is cross-origin.">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <!-- TODO(kristijanburnik): Minify and merge both: -->
+ <script src="/referrer-policy/generic/common.js"></script>
+ <script src="/referrer-policy/generic/referrer-policy-test-case.js?pipe=sub"></script>
+ </head>
+ <body>
+ <script>
+ ReferrerPolicyTestCase(
+ {
+ "referrer_policy": "origin",
+ "delivery_method": "attr-referrer",
+ "redirection": "no-redirect",
+ "origin": "cross-origin",
+ "source_protocol": "http",
+ "target_protocol": "https",
+ "subresource": "iframe-tag",
+ "subresource_path": "/referrer-policy/generic/subresource/document.py",
+ "referrer_url": "origin"
+ },
+ document.querySelector("meta[name=assert]").content,
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/origin/attr-referrer/cross-origin/http-https/iframe-tag/generic.swap-origin-redirect.http.html b/testing/web-platform/tests/referrer-policy/origin/attr-referrer/cross-origin/http-https/iframe-tag/generic.swap-origin-redirect.http.html
new file mode 100644
index 000000000..f5542f97e
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/origin/attr-referrer/cross-origin/http-https/iframe-tag/generic.swap-origin-redirect.http.html
@@ -0,0 +1,40 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by referrer-policy/generic/tools/generate.py using referrer-policy/generic/template/test.release.html.template. -->
+<html>
+ <head>
+ <title>Referrer-Policy: Referrer Policy is set to 'origin'</title>
+ <meta name="description" content="Check that all subresources in all casses get only the origin portion of the referrer URL.">
+ <link rel="author" title="Kristijan Burnik" href="burnik@chromium.org">
+ <link rel="help" href="https://w3c.github.io/webappsec-referrer-policy/#referrer-policy-origin">
+ <meta name="assert" content="The referrer URL is origin when a
+ document served over http requires an https
+ sub-resource via iframe-tag using the attr-referrer
+ delivery method with swap-origin-redirect and when
+ the target request is cross-origin.">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <!-- TODO(kristijanburnik): Minify and merge both: -->
+ <script src="/referrer-policy/generic/common.js"></script>
+ <script src="/referrer-policy/generic/referrer-policy-test-case.js?pipe=sub"></script>
+ </head>
+ <body>
+ <script>
+ ReferrerPolicyTestCase(
+ {
+ "referrer_policy": "origin",
+ "delivery_method": "attr-referrer",
+ "redirection": "swap-origin-redirect",
+ "origin": "cross-origin",
+ "source_protocol": "http",
+ "target_protocol": "https",
+ "subresource": "iframe-tag",
+ "subresource_path": "/referrer-policy/generic/subresource/document.py",
+ "referrer_url": "origin"
+ },
+ document.querySelector("meta[name=assert]").content,
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/origin/attr-referrer/cross-origin/http-https/img-tag/generic.keep-origin-redirect.http.html b/testing/web-platform/tests/referrer-policy/origin/attr-referrer/cross-origin/http-https/img-tag/generic.keep-origin-redirect.http.html
new file mode 100644
index 000000000..8cec185e1
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/origin/attr-referrer/cross-origin/http-https/img-tag/generic.keep-origin-redirect.http.html
@@ -0,0 +1,40 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by referrer-policy/generic/tools/generate.py using referrer-policy/generic/template/test.release.html.template. -->
+<html>
+ <head>
+ <title>Referrer-Policy: Referrer Policy is set to 'origin'</title>
+ <meta name="description" content="Check that all subresources in all casses get only the origin portion of the referrer URL.">
+ <link rel="author" title="Kristijan Burnik" href="burnik@chromium.org">
+ <link rel="help" href="https://w3c.github.io/webappsec-referrer-policy/#referrer-policy-origin">
+ <meta name="assert" content="The referrer URL is origin when a
+ document served over http requires an https
+ sub-resource via img-tag using the attr-referrer
+ delivery method with keep-origin-redirect and when
+ the target request is cross-origin.">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <!-- TODO(kristijanburnik): Minify and merge both: -->
+ <script src="/referrer-policy/generic/common.js"></script>
+ <script src="/referrer-policy/generic/referrer-policy-test-case.js?pipe=sub"></script>
+ </head>
+ <body>
+ <script>
+ ReferrerPolicyTestCase(
+ {
+ "referrer_policy": "origin",
+ "delivery_method": "attr-referrer",
+ "redirection": "keep-origin-redirect",
+ "origin": "cross-origin",
+ "source_protocol": "http",
+ "target_protocol": "https",
+ "subresource": "img-tag",
+ "subresource_path": "/referrer-policy/generic/subresource/image.py",
+ "referrer_url": "origin"
+ },
+ document.querySelector("meta[name=assert]").content,
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/origin/attr-referrer/cross-origin/http-https/img-tag/generic.no-redirect.http.html b/testing/web-platform/tests/referrer-policy/origin/attr-referrer/cross-origin/http-https/img-tag/generic.no-redirect.http.html
new file mode 100644
index 000000000..9cb253f35
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/origin/attr-referrer/cross-origin/http-https/img-tag/generic.no-redirect.http.html
@@ -0,0 +1,40 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by referrer-policy/generic/tools/generate.py using referrer-policy/generic/template/test.release.html.template. -->
+<html>
+ <head>
+ <title>Referrer-Policy: Referrer Policy is set to 'origin'</title>
+ <meta name="description" content="Check that all subresources in all casses get only the origin portion of the referrer URL.">
+ <link rel="author" title="Kristijan Burnik" href="burnik@chromium.org">
+ <link rel="help" href="https://w3c.github.io/webappsec-referrer-policy/#referrer-policy-origin">
+ <meta name="assert" content="The referrer URL is origin when a
+ document served over http requires an https
+ sub-resource via img-tag using the attr-referrer
+ delivery method with no-redirect and when
+ the target request is cross-origin.">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <!-- TODO(kristijanburnik): Minify and merge both: -->
+ <script src="/referrer-policy/generic/common.js"></script>
+ <script src="/referrer-policy/generic/referrer-policy-test-case.js?pipe=sub"></script>
+ </head>
+ <body>
+ <script>
+ ReferrerPolicyTestCase(
+ {
+ "referrer_policy": "origin",
+ "delivery_method": "attr-referrer",
+ "redirection": "no-redirect",
+ "origin": "cross-origin",
+ "source_protocol": "http",
+ "target_protocol": "https",
+ "subresource": "img-tag",
+ "subresource_path": "/referrer-policy/generic/subresource/image.py",
+ "referrer_url": "origin"
+ },
+ document.querySelector("meta[name=assert]").content,
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/origin/attr-referrer/cross-origin/http-https/img-tag/generic.swap-origin-redirect.http.html b/testing/web-platform/tests/referrer-policy/origin/attr-referrer/cross-origin/http-https/img-tag/generic.swap-origin-redirect.http.html
new file mode 100644
index 000000000..2ce74e688
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/origin/attr-referrer/cross-origin/http-https/img-tag/generic.swap-origin-redirect.http.html
@@ -0,0 +1,40 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by referrer-policy/generic/tools/generate.py using referrer-policy/generic/template/test.release.html.template. -->
+<html>
+ <head>
+ <title>Referrer-Policy: Referrer Policy is set to 'origin'</title>
+ <meta name="description" content="Check that all subresources in all casses get only the origin portion of the referrer URL.">
+ <link rel="author" title="Kristijan Burnik" href="burnik@chromium.org">
+ <link rel="help" href="https://w3c.github.io/webappsec-referrer-policy/#referrer-policy-origin">
+ <meta name="assert" content="The referrer URL is origin when a
+ document served over http requires an https
+ sub-resource via img-tag using the attr-referrer
+ delivery method with swap-origin-redirect and when
+ the target request is cross-origin.">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <!-- TODO(kristijanburnik): Minify and merge both: -->
+ <script src="/referrer-policy/generic/common.js"></script>
+ <script src="/referrer-policy/generic/referrer-policy-test-case.js?pipe=sub"></script>
+ </head>
+ <body>
+ <script>
+ ReferrerPolicyTestCase(
+ {
+ "referrer_policy": "origin",
+ "delivery_method": "attr-referrer",
+ "redirection": "swap-origin-redirect",
+ "origin": "cross-origin",
+ "source_protocol": "http",
+ "target_protocol": "https",
+ "subresource": "img-tag",
+ "subresource_path": "/referrer-policy/generic/subresource/image.py",
+ "referrer_url": "origin"
+ },
+ document.querySelector("meta[name=assert]").content,
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/origin/attr-referrer/same-origin/http-http/iframe-tag/generic.keep-origin-redirect.http.html b/testing/web-platform/tests/referrer-policy/origin/attr-referrer/same-origin/http-http/iframe-tag/generic.keep-origin-redirect.http.html
new file mode 100644
index 000000000..ce0b1252e
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/origin/attr-referrer/same-origin/http-http/iframe-tag/generic.keep-origin-redirect.http.html
@@ -0,0 +1,40 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by referrer-policy/generic/tools/generate.py using referrer-policy/generic/template/test.release.html.template. -->
+<html>
+ <head>
+ <title>Referrer-Policy: Referrer Policy is set to 'origin'</title>
+ <meta name="description" content="Check that all subresources in all casses get only the origin portion of the referrer URL.">
+ <link rel="author" title="Kristijan Burnik" href="burnik@chromium.org">
+ <link rel="help" href="https://w3c.github.io/webappsec-referrer-policy/#referrer-policy-origin">
+ <meta name="assert" content="The referrer URL is origin when a
+ document served over http requires an http
+ sub-resource via iframe-tag using the attr-referrer
+ delivery method with keep-origin-redirect and when
+ the target request is same-origin.">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <!-- TODO(kristijanburnik): Minify and merge both: -->
+ <script src="/referrer-policy/generic/common.js"></script>
+ <script src="/referrer-policy/generic/referrer-policy-test-case.js?pipe=sub"></script>
+ </head>
+ <body>
+ <script>
+ ReferrerPolicyTestCase(
+ {
+ "referrer_policy": "origin",
+ "delivery_method": "attr-referrer",
+ "redirection": "keep-origin-redirect",
+ "origin": "same-origin",
+ "source_protocol": "http",
+ "target_protocol": "http",
+ "subresource": "iframe-tag",
+ "subresource_path": "/referrer-policy/generic/subresource/document.py",
+ "referrer_url": "origin"
+ },
+ document.querySelector("meta[name=assert]").content,
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/origin/attr-referrer/same-origin/http-http/iframe-tag/generic.no-redirect.http.html b/testing/web-platform/tests/referrer-policy/origin/attr-referrer/same-origin/http-http/iframe-tag/generic.no-redirect.http.html
new file mode 100644
index 000000000..39304901c
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/origin/attr-referrer/same-origin/http-http/iframe-tag/generic.no-redirect.http.html
@@ -0,0 +1,40 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by referrer-policy/generic/tools/generate.py using referrer-policy/generic/template/test.release.html.template. -->
+<html>
+ <head>
+ <title>Referrer-Policy: Referrer Policy is set to 'origin'</title>
+ <meta name="description" content="Check that all subresources in all casses get only the origin portion of the referrer URL.">
+ <link rel="author" title="Kristijan Burnik" href="burnik@chromium.org">
+ <link rel="help" href="https://w3c.github.io/webappsec-referrer-policy/#referrer-policy-origin">
+ <meta name="assert" content="The referrer URL is origin when a
+ document served over http requires an http
+ sub-resource via iframe-tag using the attr-referrer
+ delivery method with no-redirect and when
+ the target request is same-origin.">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <!-- TODO(kristijanburnik): Minify and merge both: -->
+ <script src="/referrer-policy/generic/common.js"></script>
+ <script src="/referrer-policy/generic/referrer-policy-test-case.js?pipe=sub"></script>
+ </head>
+ <body>
+ <script>
+ ReferrerPolicyTestCase(
+ {
+ "referrer_policy": "origin",
+ "delivery_method": "attr-referrer",
+ "redirection": "no-redirect",
+ "origin": "same-origin",
+ "source_protocol": "http",
+ "target_protocol": "http",
+ "subresource": "iframe-tag",
+ "subresource_path": "/referrer-policy/generic/subresource/document.py",
+ "referrer_url": "origin"
+ },
+ document.querySelector("meta[name=assert]").content,
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/origin/attr-referrer/same-origin/http-http/iframe-tag/generic.swap-origin-redirect.http.html b/testing/web-platform/tests/referrer-policy/origin/attr-referrer/same-origin/http-http/iframe-tag/generic.swap-origin-redirect.http.html
new file mode 100644
index 000000000..987106249
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/origin/attr-referrer/same-origin/http-http/iframe-tag/generic.swap-origin-redirect.http.html
@@ -0,0 +1,40 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by referrer-policy/generic/tools/generate.py using referrer-policy/generic/template/test.release.html.template. -->
+<html>
+ <head>
+ <title>Referrer-Policy: Referrer Policy is set to 'origin'</title>
+ <meta name="description" content="Check that all subresources in all casses get only the origin portion of the referrer URL.">
+ <link rel="author" title="Kristijan Burnik" href="burnik@chromium.org">
+ <link rel="help" href="https://w3c.github.io/webappsec-referrer-policy/#referrer-policy-origin">
+ <meta name="assert" content="The referrer URL is origin when a
+ document served over http requires an http
+ sub-resource via iframe-tag using the attr-referrer
+ delivery method with swap-origin-redirect and when
+ the target request is same-origin.">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <!-- TODO(kristijanburnik): Minify and merge both: -->
+ <script src="/referrer-policy/generic/common.js"></script>
+ <script src="/referrer-policy/generic/referrer-policy-test-case.js?pipe=sub"></script>
+ </head>
+ <body>
+ <script>
+ ReferrerPolicyTestCase(
+ {
+ "referrer_policy": "origin",
+ "delivery_method": "attr-referrer",
+ "redirection": "swap-origin-redirect",
+ "origin": "same-origin",
+ "source_protocol": "http",
+ "target_protocol": "http",
+ "subresource": "iframe-tag",
+ "subresource_path": "/referrer-policy/generic/subresource/document.py",
+ "referrer_url": "origin"
+ },
+ document.querySelector("meta[name=assert]").content,
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/origin/attr-referrer/same-origin/http-http/img-tag/generic.keep-origin-redirect.http.html b/testing/web-platform/tests/referrer-policy/origin/attr-referrer/same-origin/http-http/img-tag/generic.keep-origin-redirect.http.html
new file mode 100644
index 000000000..33d76d384
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/origin/attr-referrer/same-origin/http-http/img-tag/generic.keep-origin-redirect.http.html
@@ -0,0 +1,40 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by referrer-policy/generic/tools/generate.py using referrer-policy/generic/template/test.release.html.template. -->
+<html>
+ <head>
+ <title>Referrer-Policy: Referrer Policy is set to 'origin'</title>
+ <meta name="description" content="Check that all subresources in all casses get only the origin portion of the referrer URL.">
+ <link rel="author" title="Kristijan Burnik" href="burnik@chromium.org">
+ <link rel="help" href="https://w3c.github.io/webappsec-referrer-policy/#referrer-policy-origin">
+ <meta name="assert" content="The referrer URL is origin when a
+ document served over http requires an http
+ sub-resource via img-tag using the attr-referrer
+ delivery method with keep-origin-redirect and when
+ the target request is same-origin.">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <!-- TODO(kristijanburnik): Minify and merge both: -->
+ <script src="/referrer-policy/generic/common.js"></script>
+ <script src="/referrer-policy/generic/referrer-policy-test-case.js?pipe=sub"></script>
+ </head>
+ <body>
+ <script>
+ ReferrerPolicyTestCase(
+ {
+ "referrer_policy": "origin",
+ "delivery_method": "attr-referrer",
+ "redirection": "keep-origin-redirect",
+ "origin": "same-origin",
+ "source_protocol": "http",
+ "target_protocol": "http",
+ "subresource": "img-tag",
+ "subresource_path": "/referrer-policy/generic/subresource/image.py",
+ "referrer_url": "origin"
+ },
+ document.querySelector("meta[name=assert]").content,
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/origin/attr-referrer/same-origin/http-http/img-tag/generic.no-redirect.http.html b/testing/web-platform/tests/referrer-policy/origin/attr-referrer/same-origin/http-http/img-tag/generic.no-redirect.http.html
new file mode 100644
index 000000000..56a0eabe7
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/origin/attr-referrer/same-origin/http-http/img-tag/generic.no-redirect.http.html
@@ -0,0 +1,40 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by referrer-policy/generic/tools/generate.py using referrer-policy/generic/template/test.release.html.template. -->
+<html>
+ <head>
+ <title>Referrer-Policy: Referrer Policy is set to 'origin'</title>
+ <meta name="description" content="Check that all subresources in all casses get only the origin portion of the referrer URL.">
+ <link rel="author" title="Kristijan Burnik" href="burnik@chromium.org">
+ <link rel="help" href="https://w3c.github.io/webappsec-referrer-policy/#referrer-policy-origin">
+ <meta name="assert" content="The referrer URL is origin when a
+ document served over http requires an http
+ sub-resource via img-tag using the attr-referrer
+ delivery method with no-redirect and when
+ the target request is same-origin.">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <!-- TODO(kristijanburnik): Minify and merge both: -->
+ <script src="/referrer-policy/generic/common.js"></script>
+ <script src="/referrer-policy/generic/referrer-policy-test-case.js?pipe=sub"></script>
+ </head>
+ <body>
+ <script>
+ ReferrerPolicyTestCase(
+ {
+ "referrer_policy": "origin",
+ "delivery_method": "attr-referrer",
+ "redirection": "no-redirect",
+ "origin": "same-origin",
+ "source_protocol": "http",
+ "target_protocol": "http",
+ "subresource": "img-tag",
+ "subresource_path": "/referrer-policy/generic/subresource/image.py",
+ "referrer_url": "origin"
+ },
+ document.querySelector("meta[name=assert]").content,
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/origin/attr-referrer/same-origin/http-http/img-tag/generic.swap-origin-redirect.http.html b/testing/web-platform/tests/referrer-policy/origin/attr-referrer/same-origin/http-http/img-tag/generic.swap-origin-redirect.http.html
new file mode 100644
index 000000000..2befe6ff3
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/origin/attr-referrer/same-origin/http-http/img-tag/generic.swap-origin-redirect.http.html
@@ -0,0 +1,40 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by referrer-policy/generic/tools/generate.py using referrer-policy/generic/template/test.release.html.template. -->
+<html>
+ <head>
+ <title>Referrer-Policy: Referrer Policy is set to 'origin'</title>
+ <meta name="description" content="Check that all subresources in all casses get only the origin portion of the referrer URL.">
+ <link rel="author" title="Kristijan Burnik" href="burnik@chromium.org">
+ <link rel="help" href="https://w3c.github.io/webappsec-referrer-policy/#referrer-policy-origin">
+ <meta name="assert" content="The referrer URL is origin when a
+ document served over http requires an http
+ sub-resource via img-tag using the attr-referrer
+ delivery method with swap-origin-redirect and when
+ the target request is same-origin.">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <!-- TODO(kristijanburnik): Minify and merge both: -->
+ <script src="/referrer-policy/generic/common.js"></script>
+ <script src="/referrer-policy/generic/referrer-policy-test-case.js?pipe=sub"></script>
+ </head>
+ <body>
+ <script>
+ ReferrerPolicyTestCase(
+ {
+ "referrer_policy": "origin",
+ "delivery_method": "attr-referrer",
+ "redirection": "swap-origin-redirect",
+ "origin": "same-origin",
+ "source_protocol": "http",
+ "target_protocol": "http",
+ "subresource": "img-tag",
+ "subresource_path": "/referrer-policy/generic/subresource/image.py",
+ "referrer_url": "origin"
+ },
+ document.querySelector("meta[name=assert]").content,
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/origin/attr-referrer/same-origin/http-https/iframe-tag/generic.keep-origin-redirect.http.html b/testing/web-platform/tests/referrer-policy/origin/attr-referrer/same-origin/http-https/iframe-tag/generic.keep-origin-redirect.http.html
new file mode 100644
index 000000000..c9cb06842
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/origin/attr-referrer/same-origin/http-https/iframe-tag/generic.keep-origin-redirect.http.html
@@ -0,0 +1,40 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by referrer-policy/generic/tools/generate.py using referrer-policy/generic/template/test.release.html.template. -->
+<html>
+ <head>
+ <title>Referrer-Policy: Referrer Policy is set to 'origin'</title>
+ <meta name="description" content="Check that all subresources in all casses get only the origin portion of the referrer URL.">
+ <link rel="author" title="Kristijan Burnik" href="burnik@chromium.org">
+ <link rel="help" href="https://w3c.github.io/webappsec-referrer-policy/#referrer-policy-origin">
+ <meta name="assert" content="The referrer URL is origin when a
+ document served over http requires an https
+ sub-resource via iframe-tag using the attr-referrer
+ delivery method with keep-origin-redirect and when
+ the target request is same-origin.">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <!-- TODO(kristijanburnik): Minify and merge both: -->
+ <script src="/referrer-policy/generic/common.js"></script>
+ <script src="/referrer-policy/generic/referrer-policy-test-case.js?pipe=sub"></script>
+ </head>
+ <body>
+ <script>
+ ReferrerPolicyTestCase(
+ {
+ "referrer_policy": "origin",
+ "delivery_method": "attr-referrer",
+ "redirection": "keep-origin-redirect",
+ "origin": "same-origin",
+ "source_protocol": "http",
+ "target_protocol": "https",
+ "subresource": "iframe-tag",
+ "subresource_path": "/referrer-policy/generic/subresource/document.py",
+ "referrer_url": "origin"
+ },
+ document.querySelector("meta[name=assert]").content,
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/origin/attr-referrer/same-origin/http-https/iframe-tag/generic.no-redirect.http.html b/testing/web-platform/tests/referrer-policy/origin/attr-referrer/same-origin/http-https/iframe-tag/generic.no-redirect.http.html
new file mode 100644
index 000000000..c6f8e1490
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/origin/attr-referrer/same-origin/http-https/iframe-tag/generic.no-redirect.http.html
@@ -0,0 +1,40 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by referrer-policy/generic/tools/generate.py using referrer-policy/generic/template/test.release.html.template. -->
+<html>
+ <head>
+ <title>Referrer-Policy: Referrer Policy is set to 'origin'</title>
+ <meta name="description" content="Check that all subresources in all casses get only the origin portion of the referrer URL.">
+ <link rel="author" title="Kristijan Burnik" href="burnik@chromium.org">
+ <link rel="help" href="https://w3c.github.io/webappsec-referrer-policy/#referrer-policy-origin">
+ <meta name="assert" content="The referrer URL is origin when a
+ document served over http requires an https
+ sub-resource via iframe-tag using the attr-referrer
+ delivery method with no-redirect and when
+ the target request is same-origin.">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <!-- TODO(kristijanburnik): Minify and merge both: -->
+ <script src="/referrer-policy/generic/common.js"></script>
+ <script src="/referrer-policy/generic/referrer-policy-test-case.js?pipe=sub"></script>
+ </head>
+ <body>
+ <script>
+ ReferrerPolicyTestCase(
+ {
+ "referrer_policy": "origin",
+ "delivery_method": "attr-referrer",
+ "redirection": "no-redirect",
+ "origin": "same-origin",
+ "source_protocol": "http",
+ "target_protocol": "https",
+ "subresource": "iframe-tag",
+ "subresource_path": "/referrer-policy/generic/subresource/document.py",
+ "referrer_url": "origin"
+ },
+ document.querySelector("meta[name=assert]").content,
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/origin/attr-referrer/same-origin/http-https/iframe-tag/generic.swap-origin-redirect.http.html b/testing/web-platform/tests/referrer-policy/origin/attr-referrer/same-origin/http-https/iframe-tag/generic.swap-origin-redirect.http.html
new file mode 100644
index 000000000..dd44b6679
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/origin/attr-referrer/same-origin/http-https/iframe-tag/generic.swap-origin-redirect.http.html
@@ -0,0 +1,40 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by referrer-policy/generic/tools/generate.py using referrer-policy/generic/template/test.release.html.template. -->
+<html>
+ <head>
+ <title>Referrer-Policy: Referrer Policy is set to 'origin'</title>
+ <meta name="description" content="Check that all subresources in all casses get only the origin portion of the referrer URL.">
+ <link rel="author" title="Kristijan Burnik" href="burnik@chromium.org">
+ <link rel="help" href="https://w3c.github.io/webappsec-referrer-policy/#referrer-policy-origin">
+ <meta name="assert" content="The referrer URL is origin when a
+ document served over http requires an https
+ sub-resource via iframe-tag using the attr-referrer
+ delivery method with swap-origin-redirect and when
+ the target request is same-origin.">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <!-- TODO(kristijanburnik): Minify and merge both: -->
+ <script src="/referrer-policy/generic/common.js"></script>
+ <script src="/referrer-policy/generic/referrer-policy-test-case.js?pipe=sub"></script>
+ </head>
+ <body>
+ <script>
+ ReferrerPolicyTestCase(
+ {
+ "referrer_policy": "origin",
+ "delivery_method": "attr-referrer",
+ "redirection": "swap-origin-redirect",
+ "origin": "same-origin",
+ "source_protocol": "http",
+ "target_protocol": "https",
+ "subresource": "iframe-tag",
+ "subresource_path": "/referrer-policy/generic/subresource/document.py",
+ "referrer_url": "origin"
+ },
+ document.querySelector("meta[name=assert]").content,
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/origin/attr-referrer/same-origin/http-https/img-tag/generic.keep-origin-redirect.http.html b/testing/web-platform/tests/referrer-policy/origin/attr-referrer/same-origin/http-https/img-tag/generic.keep-origin-redirect.http.html
new file mode 100644
index 000000000..2ae35e050
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/origin/attr-referrer/same-origin/http-https/img-tag/generic.keep-origin-redirect.http.html
@@ -0,0 +1,40 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by referrer-policy/generic/tools/generate.py using referrer-policy/generic/template/test.release.html.template. -->
+<html>
+ <head>
+ <title>Referrer-Policy: Referrer Policy is set to 'origin'</title>
+ <meta name="description" content="Check that all subresources in all casses get only the origin portion of the referrer URL.">
+ <link rel="author" title="Kristijan Burnik" href="burnik@chromium.org">
+ <link rel="help" href="https://w3c.github.io/webappsec-referrer-policy/#referrer-policy-origin">
+ <meta name="assert" content="The referrer URL is origin when a
+ document served over http requires an https
+ sub-resource via img-tag using the attr-referrer
+ delivery method with keep-origin-redirect and when
+ the target request is same-origin.">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <!-- TODO(kristijanburnik): Minify and merge both: -->
+ <script src="/referrer-policy/generic/common.js"></script>
+ <script src="/referrer-policy/generic/referrer-policy-test-case.js?pipe=sub"></script>
+ </head>
+ <body>
+ <script>
+ ReferrerPolicyTestCase(
+ {
+ "referrer_policy": "origin",
+ "delivery_method": "attr-referrer",
+ "redirection": "keep-origin-redirect",
+ "origin": "same-origin",
+ "source_protocol": "http",
+ "target_protocol": "https",
+ "subresource": "img-tag",
+ "subresource_path": "/referrer-policy/generic/subresource/image.py",
+ "referrer_url": "origin"
+ },
+ document.querySelector("meta[name=assert]").content,
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/origin/attr-referrer/same-origin/http-https/img-tag/generic.no-redirect.http.html b/testing/web-platform/tests/referrer-policy/origin/attr-referrer/same-origin/http-https/img-tag/generic.no-redirect.http.html
new file mode 100644
index 000000000..2b7cc6d59
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/origin/attr-referrer/same-origin/http-https/img-tag/generic.no-redirect.http.html
@@ -0,0 +1,40 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by referrer-policy/generic/tools/generate.py using referrer-policy/generic/template/test.release.html.template. -->
+<html>
+ <head>
+ <title>Referrer-Policy: Referrer Policy is set to 'origin'</title>
+ <meta name="description" content="Check that all subresources in all casses get only the origin portion of the referrer URL.">
+ <link rel="author" title="Kristijan Burnik" href="burnik@chromium.org">
+ <link rel="help" href="https://w3c.github.io/webappsec-referrer-policy/#referrer-policy-origin">
+ <meta name="assert" content="The referrer URL is origin when a
+ document served over http requires an https
+ sub-resource via img-tag using the attr-referrer
+ delivery method with no-redirect and when
+ the target request is same-origin.">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <!-- TODO(kristijanburnik): Minify and merge both: -->
+ <script src="/referrer-policy/generic/common.js"></script>
+ <script src="/referrer-policy/generic/referrer-policy-test-case.js?pipe=sub"></script>
+ </head>
+ <body>
+ <script>
+ ReferrerPolicyTestCase(
+ {
+ "referrer_policy": "origin",
+ "delivery_method": "attr-referrer",
+ "redirection": "no-redirect",
+ "origin": "same-origin",
+ "source_protocol": "http",
+ "target_protocol": "https",
+ "subresource": "img-tag",
+ "subresource_path": "/referrer-policy/generic/subresource/image.py",
+ "referrer_url": "origin"
+ },
+ document.querySelector("meta[name=assert]").content,
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/origin/attr-referrer/same-origin/http-https/img-tag/generic.swap-origin-redirect.http.html b/testing/web-platform/tests/referrer-policy/origin/attr-referrer/same-origin/http-https/img-tag/generic.swap-origin-redirect.http.html
new file mode 100644
index 000000000..a6bbc66d3
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/origin/attr-referrer/same-origin/http-https/img-tag/generic.swap-origin-redirect.http.html
@@ -0,0 +1,40 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by referrer-policy/generic/tools/generate.py using referrer-policy/generic/template/test.release.html.template. -->
+<html>
+ <head>
+ <title>Referrer-Policy: Referrer Policy is set to 'origin'</title>
+ <meta name="description" content="Check that all subresources in all casses get only the origin portion of the referrer URL.">
+ <link rel="author" title="Kristijan Burnik" href="burnik@chromium.org">
+ <link rel="help" href="https://w3c.github.io/webappsec-referrer-policy/#referrer-policy-origin">
+ <meta name="assert" content="The referrer URL is origin when a
+ document served over http requires an https
+ sub-resource via img-tag using the attr-referrer
+ delivery method with swap-origin-redirect and when
+ the target request is same-origin.">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <!-- TODO(kristijanburnik): Minify and merge both: -->
+ <script src="/referrer-policy/generic/common.js"></script>
+ <script src="/referrer-policy/generic/referrer-policy-test-case.js?pipe=sub"></script>
+ </head>
+ <body>
+ <script>
+ ReferrerPolicyTestCase(
+ {
+ "referrer_policy": "origin",
+ "delivery_method": "attr-referrer",
+ "redirection": "swap-origin-redirect",
+ "origin": "same-origin",
+ "source_protocol": "http",
+ "target_protocol": "https",
+ "subresource": "img-tag",
+ "subresource_path": "/referrer-policy/generic/subresource/image.py",
+ "referrer_url": "origin"
+ },
+ document.querySelector("meta[name=assert]").content,
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/origin/http-rp/cross-origin/http-http/fetch-request/generic.keep-origin-redirect.http.html b/testing/web-platform/tests/referrer-policy/origin/http-rp/cross-origin/http-http/fetch-request/generic.keep-origin-redirect.http.html
new file mode 100644
index 000000000..758ab5767
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/origin/http-rp/cross-origin/http-http/fetch-request/generic.keep-origin-redirect.http.html
@@ -0,0 +1,41 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by referrer-policy/generic/tools/generate.py using referrer-policy/generic/template/test.release.html.template. -->
+<html>
+ <head>
+ <title>Referrer-Policy: Referrer Policy is set to 'origin'</title>
+ <meta name="description" content="Check that all subresources in all casses get only the origin portion of the referrer URL.">
+ <!-- No meta: Referrer policy delivered via HTTP headers. -->
+ <link rel="author" title="Kristijan Burnik" href="burnik@chromium.org">
+ <link rel="help" href="https://w3c.github.io/webappsec-referrer-policy/#referrer-policy-origin">
+ <meta name="assert" content="The referrer URL is origin when a
+ document served over http requires an http
+ sub-resource via fetch-request using the http-rp
+ delivery method with keep-origin-redirect and when
+ the target request is cross-origin.">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <!-- TODO(kristijanburnik): Minify and merge both: -->
+ <script src="/referrer-policy/generic/common.js"></script>
+ <script src="/referrer-policy/generic/referrer-policy-test-case.js?pipe=sub"></script>
+ </head>
+ <body>
+ <script>
+ ReferrerPolicyTestCase(
+ {
+ "referrer_policy": "origin",
+ "delivery_method": "http-rp",
+ "redirection": "keep-origin-redirect",
+ "origin": "cross-origin",
+ "source_protocol": "http",
+ "target_protocol": "http",
+ "subresource": "fetch-request",
+ "subresource_path": "/referrer-policy/generic/subresource/xhr.py",
+ "referrer_url": "origin"
+ },
+ document.querySelector("meta[name=assert]").content,
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/origin/http-rp/cross-origin/http-http/fetch-request/generic.keep-origin-redirect.http.html.headers b/testing/web-platform/tests/referrer-policy/origin/http-rp/cross-origin/http-http/fetch-request/generic.keep-origin-redirect.http.html.headers
new file mode 100644
index 000000000..306a53536
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/origin/http-rp/cross-origin/http-http/fetch-request/generic.keep-origin-redirect.http.html.headers
@@ -0,0 +1,2 @@
+Referrer-Policy: origin
+Access-Control-Allow-Origin: *
diff --git a/testing/web-platform/tests/referrer-policy/origin/http-rp/cross-origin/http-http/fetch-request/generic.no-redirect.http.html b/testing/web-platform/tests/referrer-policy/origin/http-rp/cross-origin/http-http/fetch-request/generic.no-redirect.http.html
new file mode 100644
index 000000000..35a5049a5
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/origin/http-rp/cross-origin/http-http/fetch-request/generic.no-redirect.http.html
@@ -0,0 +1,41 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by referrer-policy/generic/tools/generate.py using referrer-policy/generic/template/test.release.html.template. -->
+<html>
+ <head>
+ <title>Referrer-Policy: Referrer Policy is set to 'origin'</title>
+ <meta name="description" content="Check that all subresources in all casses get only the origin portion of the referrer URL.">
+ <!-- No meta: Referrer policy delivered via HTTP headers. -->
+ <link rel="author" title="Kristijan Burnik" href="burnik@chromium.org">
+ <link rel="help" href="https://w3c.github.io/webappsec-referrer-policy/#referrer-policy-origin">
+ <meta name="assert" content="The referrer URL is origin when a
+ document served over http requires an http
+ sub-resource via fetch-request using the http-rp
+ delivery method with no-redirect and when
+ the target request is cross-origin.">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <!-- TODO(kristijanburnik): Minify and merge both: -->
+ <script src="/referrer-policy/generic/common.js"></script>
+ <script src="/referrer-policy/generic/referrer-policy-test-case.js?pipe=sub"></script>
+ </head>
+ <body>
+ <script>
+ ReferrerPolicyTestCase(
+ {
+ "referrer_policy": "origin",
+ "delivery_method": "http-rp",
+ "redirection": "no-redirect",
+ "origin": "cross-origin",
+ "source_protocol": "http",
+ "target_protocol": "http",
+ "subresource": "fetch-request",
+ "subresource_path": "/referrer-policy/generic/subresource/xhr.py",
+ "referrer_url": "origin"
+ },
+ document.querySelector("meta[name=assert]").content,
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/origin/http-rp/cross-origin/http-http/fetch-request/generic.no-redirect.http.html.headers b/testing/web-platform/tests/referrer-policy/origin/http-rp/cross-origin/http-http/fetch-request/generic.no-redirect.http.html.headers
new file mode 100644
index 000000000..306a53536
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/origin/http-rp/cross-origin/http-http/fetch-request/generic.no-redirect.http.html.headers
@@ -0,0 +1,2 @@
+Referrer-Policy: origin
+Access-Control-Allow-Origin: *
diff --git a/testing/web-platform/tests/referrer-policy/origin/http-rp/cross-origin/http-http/fetch-request/generic.swap-origin-redirect.http.html b/testing/web-platform/tests/referrer-policy/origin/http-rp/cross-origin/http-http/fetch-request/generic.swap-origin-redirect.http.html
new file mode 100644
index 000000000..851b077e6
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/origin/http-rp/cross-origin/http-http/fetch-request/generic.swap-origin-redirect.http.html
@@ -0,0 +1,41 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by referrer-policy/generic/tools/generate.py using referrer-policy/generic/template/test.release.html.template. -->
+<html>
+ <head>
+ <title>Referrer-Policy: Referrer Policy is set to 'origin'</title>
+ <meta name="description" content="Check that all subresources in all casses get only the origin portion of the referrer URL.">
+ <!-- No meta: Referrer policy delivered via HTTP headers. -->
+ <link rel="author" title="Kristijan Burnik" href="burnik@chromium.org">
+ <link rel="help" href="https://w3c.github.io/webappsec-referrer-policy/#referrer-policy-origin">
+ <meta name="assert" content="The referrer URL is origin when a
+ document served over http requires an http
+ sub-resource via fetch-request using the http-rp
+ delivery method with swap-origin-redirect and when
+ the target request is cross-origin.">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <!-- TODO(kristijanburnik): Minify and merge both: -->
+ <script src="/referrer-policy/generic/common.js"></script>
+ <script src="/referrer-policy/generic/referrer-policy-test-case.js?pipe=sub"></script>
+ </head>
+ <body>
+ <script>
+ ReferrerPolicyTestCase(
+ {
+ "referrer_policy": "origin",
+ "delivery_method": "http-rp",
+ "redirection": "swap-origin-redirect",
+ "origin": "cross-origin",
+ "source_protocol": "http",
+ "target_protocol": "http",
+ "subresource": "fetch-request",
+ "subresource_path": "/referrer-policy/generic/subresource/xhr.py",
+ "referrer_url": "origin"
+ },
+ document.querySelector("meta[name=assert]").content,
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/origin/http-rp/cross-origin/http-http/fetch-request/generic.swap-origin-redirect.http.html.headers b/testing/web-platform/tests/referrer-policy/origin/http-rp/cross-origin/http-http/fetch-request/generic.swap-origin-redirect.http.html.headers
new file mode 100644
index 000000000..306a53536
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/origin/http-rp/cross-origin/http-http/fetch-request/generic.swap-origin-redirect.http.html.headers
@@ -0,0 +1,2 @@
+Referrer-Policy: origin
+Access-Control-Allow-Origin: *
diff --git a/testing/web-platform/tests/referrer-policy/origin/http-rp/cross-origin/http-http/iframe-tag/generic.keep-origin-redirect.http.html b/testing/web-platform/tests/referrer-policy/origin/http-rp/cross-origin/http-http/iframe-tag/generic.keep-origin-redirect.http.html
new file mode 100644
index 000000000..cd93dd64a
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/origin/http-rp/cross-origin/http-http/iframe-tag/generic.keep-origin-redirect.http.html
@@ -0,0 +1,41 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by referrer-policy/generic/tools/generate.py using referrer-policy/generic/template/test.release.html.template. -->
+<html>
+ <head>
+ <title>Referrer-Policy: Referrer Policy is set to 'origin'</title>
+ <meta name="description" content="Check that all subresources in all casses get only the origin portion of the referrer URL.">
+ <!-- No meta: Referrer policy delivered via HTTP headers. -->
+ <link rel="author" title="Kristijan Burnik" href="burnik@chromium.org">
+ <link rel="help" href="https://w3c.github.io/webappsec-referrer-policy/#referrer-policy-origin">
+ <meta name="assert" content="The referrer URL is origin when a
+ document served over http requires an http
+ sub-resource via iframe-tag using the http-rp
+ delivery method with keep-origin-redirect and when
+ the target request is cross-origin.">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <!-- TODO(kristijanburnik): Minify and merge both: -->
+ <script src="/referrer-policy/generic/common.js"></script>
+ <script src="/referrer-policy/generic/referrer-policy-test-case.js?pipe=sub"></script>
+ </head>
+ <body>
+ <script>
+ ReferrerPolicyTestCase(
+ {
+ "referrer_policy": "origin",
+ "delivery_method": "http-rp",
+ "redirection": "keep-origin-redirect",
+ "origin": "cross-origin",
+ "source_protocol": "http",
+ "target_protocol": "http",
+ "subresource": "iframe-tag",
+ "subresource_path": "/referrer-policy/generic/subresource/document.py",
+ "referrer_url": "origin"
+ },
+ document.querySelector("meta[name=assert]").content,
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/origin/http-rp/cross-origin/http-http/iframe-tag/generic.keep-origin-redirect.http.html.headers b/testing/web-platform/tests/referrer-policy/origin/http-rp/cross-origin/http-http/iframe-tag/generic.keep-origin-redirect.http.html.headers
new file mode 100644
index 000000000..306a53536
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/origin/http-rp/cross-origin/http-http/iframe-tag/generic.keep-origin-redirect.http.html.headers
@@ -0,0 +1,2 @@
+Referrer-Policy: origin
+Access-Control-Allow-Origin: *
diff --git a/testing/web-platform/tests/referrer-policy/origin/http-rp/cross-origin/http-http/iframe-tag/generic.no-redirect.http.html b/testing/web-platform/tests/referrer-policy/origin/http-rp/cross-origin/http-http/iframe-tag/generic.no-redirect.http.html
new file mode 100644
index 000000000..3cdd17258
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/origin/http-rp/cross-origin/http-http/iframe-tag/generic.no-redirect.http.html
@@ -0,0 +1,41 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by referrer-policy/generic/tools/generate.py using referrer-policy/generic/template/test.release.html.template. -->
+<html>
+ <head>
+ <title>Referrer-Policy: Referrer Policy is set to 'origin'</title>
+ <meta name="description" content="Check that all subresources in all casses get only the origin portion of the referrer URL.">
+ <!-- No meta: Referrer policy delivered via HTTP headers. -->
+ <link rel="author" title="Kristijan Burnik" href="burnik@chromium.org">
+ <link rel="help" href="https://w3c.github.io/webappsec-referrer-policy/#referrer-policy-origin">
+ <meta name="assert" content="The referrer URL is origin when a
+ document served over http requires an http
+ sub-resource via iframe-tag using the http-rp
+ delivery method with no-redirect and when
+ the target request is cross-origin.">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <!-- TODO(kristijanburnik): Minify and merge both: -->
+ <script src="/referrer-policy/generic/common.js"></script>
+ <script src="/referrer-policy/generic/referrer-policy-test-case.js?pipe=sub"></script>
+ </head>
+ <body>
+ <script>
+ ReferrerPolicyTestCase(
+ {
+ "referrer_policy": "origin",
+ "delivery_method": "http-rp",
+ "redirection": "no-redirect",
+ "origin": "cross-origin",
+ "source_protocol": "http",
+ "target_protocol": "http",
+ "subresource": "iframe-tag",
+ "subresource_path": "/referrer-policy/generic/subresource/document.py",
+ "referrer_url": "origin"
+ },
+ document.querySelector("meta[name=assert]").content,
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/origin/http-rp/cross-origin/http-http/iframe-tag/generic.no-redirect.http.html.headers b/testing/web-platform/tests/referrer-policy/origin/http-rp/cross-origin/http-http/iframe-tag/generic.no-redirect.http.html.headers
new file mode 100644
index 000000000..306a53536
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/origin/http-rp/cross-origin/http-http/iframe-tag/generic.no-redirect.http.html.headers
@@ -0,0 +1,2 @@
+Referrer-Policy: origin
+Access-Control-Allow-Origin: *
diff --git a/testing/web-platform/tests/referrer-policy/origin/http-rp/cross-origin/http-http/iframe-tag/generic.swap-origin-redirect.http.html b/testing/web-platform/tests/referrer-policy/origin/http-rp/cross-origin/http-http/iframe-tag/generic.swap-origin-redirect.http.html
new file mode 100644
index 000000000..34be306a1
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/origin/http-rp/cross-origin/http-http/iframe-tag/generic.swap-origin-redirect.http.html
@@ -0,0 +1,41 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by referrer-policy/generic/tools/generate.py using referrer-policy/generic/template/test.release.html.template. -->
+<html>
+ <head>
+ <title>Referrer-Policy: Referrer Policy is set to 'origin'</title>
+ <meta name="description" content="Check that all subresources in all casses get only the origin portion of the referrer URL.">
+ <!-- No meta: Referrer policy delivered via HTTP headers. -->
+ <link rel="author" title="Kristijan Burnik" href="burnik@chromium.org">
+ <link rel="help" href="https://w3c.github.io/webappsec-referrer-policy/#referrer-policy-origin">
+ <meta name="assert" content="The referrer URL is origin when a
+ document served over http requires an http
+ sub-resource via iframe-tag using the http-rp
+ delivery method with swap-origin-redirect and when
+ the target request is cross-origin.">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <!-- TODO(kristijanburnik): Minify and merge both: -->
+ <script src="/referrer-policy/generic/common.js"></script>
+ <script src="/referrer-policy/generic/referrer-policy-test-case.js?pipe=sub"></script>
+ </head>
+ <body>
+ <script>
+ ReferrerPolicyTestCase(
+ {
+ "referrer_policy": "origin",
+ "delivery_method": "http-rp",
+ "redirection": "swap-origin-redirect",
+ "origin": "cross-origin",
+ "source_protocol": "http",
+ "target_protocol": "http",
+ "subresource": "iframe-tag",
+ "subresource_path": "/referrer-policy/generic/subresource/document.py",
+ "referrer_url": "origin"
+ },
+ document.querySelector("meta[name=assert]").content,
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/origin/http-rp/cross-origin/http-http/iframe-tag/generic.swap-origin-redirect.http.html.headers b/testing/web-platform/tests/referrer-policy/origin/http-rp/cross-origin/http-http/iframe-tag/generic.swap-origin-redirect.http.html.headers
new file mode 100644
index 000000000..306a53536
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/origin/http-rp/cross-origin/http-http/iframe-tag/generic.swap-origin-redirect.http.html.headers
@@ -0,0 +1,2 @@
+Referrer-Policy: origin
+Access-Control-Allow-Origin: *
diff --git a/testing/web-platform/tests/referrer-policy/origin/http-rp/cross-origin/http-http/img-tag/generic.keep-origin-redirect.http.html b/testing/web-platform/tests/referrer-policy/origin/http-rp/cross-origin/http-http/img-tag/generic.keep-origin-redirect.http.html
new file mode 100644
index 000000000..33fe33fb1
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/origin/http-rp/cross-origin/http-http/img-tag/generic.keep-origin-redirect.http.html
@@ -0,0 +1,41 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by referrer-policy/generic/tools/generate.py using referrer-policy/generic/template/test.release.html.template. -->
+<html>
+ <head>
+ <title>Referrer-Policy: Referrer Policy is set to 'origin'</title>
+ <meta name="description" content="Check that all subresources in all casses get only the origin portion of the referrer URL.">
+ <!-- No meta: Referrer policy delivered via HTTP headers. -->
+ <link rel="author" title="Kristijan Burnik" href="burnik@chromium.org">
+ <link rel="help" href="https://w3c.github.io/webappsec-referrer-policy/#referrer-policy-origin">
+ <meta name="assert" content="The referrer URL is origin when a
+ document served over http requires an http
+ sub-resource via img-tag using the http-rp
+ delivery method with keep-origin-redirect and when
+ the target request is cross-origin.">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <!-- TODO(kristijanburnik): Minify and merge both: -->
+ <script src="/referrer-policy/generic/common.js"></script>
+ <script src="/referrer-policy/generic/referrer-policy-test-case.js?pipe=sub"></script>
+ </head>
+ <body>
+ <script>
+ ReferrerPolicyTestCase(
+ {
+ "referrer_policy": "origin",
+ "delivery_method": "http-rp",
+ "redirection": "keep-origin-redirect",
+ "origin": "cross-origin",
+ "source_protocol": "http",
+ "target_protocol": "http",
+ "subresource": "img-tag",
+ "subresource_path": "/referrer-policy/generic/subresource/image.py",
+ "referrer_url": "origin"
+ },
+ document.querySelector("meta[name=assert]").content,
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/origin/http-rp/cross-origin/http-http/img-tag/generic.keep-origin-redirect.http.html.headers b/testing/web-platform/tests/referrer-policy/origin/http-rp/cross-origin/http-http/img-tag/generic.keep-origin-redirect.http.html.headers
new file mode 100644
index 000000000..306a53536
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/origin/http-rp/cross-origin/http-http/img-tag/generic.keep-origin-redirect.http.html.headers
@@ -0,0 +1,2 @@
+Referrer-Policy: origin
+Access-Control-Allow-Origin: *
diff --git a/testing/web-platform/tests/referrer-policy/origin/http-rp/cross-origin/http-http/img-tag/generic.no-redirect.http.html b/testing/web-platform/tests/referrer-policy/origin/http-rp/cross-origin/http-http/img-tag/generic.no-redirect.http.html
new file mode 100644
index 000000000..eecbe272b
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/origin/http-rp/cross-origin/http-http/img-tag/generic.no-redirect.http.html
@@ -0,0 +1,41 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by referrer-policy/generic/tools/generate.py using referrer-policy/generic/template/test.release.html.template. -->
+<html>
+ <head>
+ <title>Referrer-Policy: Referrer Policy is set to 'origin'</title>
+ <meta name="description" content="Check that all subresources in all casses get only the origin portion of the referrer URL.">
+ <!-- No meta: Referrer policy delivered via HTTP headers. -->
+ <link rel="author" title="Kristijan Burnik" href="burnik@chromium.org">
+ <link rel="help" href="https://w3c.github.io/webappsec-referrer-policy/#referrer-policy-origin">
+ <meta name="assert" content="The referrer URL is origin when a
+ document served over http requires an http
+ sub-resource via img-tag using the http-rp
+ delivery method with no-redirect and when
+ the target request is cross-origin.">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <!-- TODO(kristijanburnik): Minify and merge both: -->
+ <script src="/referrer-policy/generic/common.js"></script>
+ <script src="/referrer-policy/generic/referrer-policy-test-case.js?pipe=sub"></script>
+ </head>
+ <body>
+ <script>
+ ReferrerPolicyTestCase(
+ {
+ "referrer_policy": "origin",
+ "delivery_method": "http-rp",
+ "redirection": "no-redirect",
+ "origin": "cross-origin",
+ "source_protocol": "http",
+ "target_protocol": "http",
+ "subresource": "img-tag",
+ "subresource_path": "/referrer-policy/generic/subresource/image.py",
+ "referrer_url": "origin"
+ },
+ document.querySelector("meta[name=assert]").content,
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/origin/http-rp/cross-origin/http-http/img-tag/generic.no-redirect.http.html.headers b/testing/web-platform/tests/referrer-policy/origin/http-rp/cross-origin/http-http/img-tag/generic.no-redirect.http.html.headers
new file mode 100644
index 000000000..306a53536
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/origin/http-rp/cross-origin/http-http/img-tag/generic.no-redirect.http.html.headers
@@ -0,0 +1,2 @@
+Referrer-Policy: origin
+Access-Control-Allow-Origin: *
diff --git a/testing/web-platform/tests/referrer-policy/origin/http-rp/cross-origin/http-http/img-tag/generic.swap-origin-redirect.http.html b/testing/web-platform/tests/referrer-policy/origin/http-rp/cross-origin/http-http/img-tag/generic.swap-origin-redirect.http.html
new file mode 100644
index 000000000..90f8d6aa6
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/origin/http-rp/cross-origin/http-http/img-tag/generic.swap-origin-redirect.http.html
@@ -0,0 +1,41 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by referrer-policy/generic/tools/generate.py using referrer-policy/generic/template/test.release.html.template. -->
+<html>
+ <head>
+ <title>Referrer-Policy: Referrer Policy is set to 'origin'</title>
+ <meta name="description" content="Check that all subresources in all casses get only the origin portion of the referrer URL.">
+ <!-- No meta: Referrer policy delivered via HTTP headers. -->
+ <link rel="author" title="Kristijan Burnik" href="burnik@chromium.org">
+ <link rel="help" href="https://w3c.github.io/webappsec-referrer-policy/#referrer-policy-origin">
+ <meta name="assert" content="The referrer URL is origin when a
+ document served over http requires an http
+ sub-resource via img-tag using the http-rp
+ delivery method with swap-origin-redirect and when
+ the target request is cross-origin.">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <!-- TODO(kristijanburnik): Minify and merge both: -->
+ <script src="/referrer-policy/generic/common.js"></script>
+ <script src="/referrer-policy/generic/referrer-policy-test-case.js?pipe=sub"></script>
+ </head>
+ <body>
+ <script>
+ ReferrerPolicyTestCase(
+ {
+ "referrer_policy": "origin",
+ "delivery_method": "http-rp",
+ "redirection": "swap-origin-redirect",
+ "origin": "cross-origin",
+ "source_protocol": "http",
+ "target_protocol": "http",
+ "subresource": "img-tag",
+ "subresource_path": "/referrer-policy/generic/subresource/image.py",
+ "referrer_url": "origin"
+ },
+ document.querySelector("meta[name=assert]").content,
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/origin/http-rp/cross-origin/http-http/img-tag/generic.swap-origin-redirect.http.html.headers b/testing/web-platform/tests/referrer-policy/origin/http-rp/cross-origin/http-http/img-tag/generic.swap-origin-redirect.http.html.headers
new file mode 100644
index 000000000..306a53536
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/origin/http-rp/cross-origin/http-http/img-tag/generic.swap-origin-redirect.http.html.headers
@@ -0,0 +1,2 @@
+Referrer-Policy: origin
+Access-Control-Allow-Origin: *
diff --git a/testing/web-platform/tests/referrer-policy/origin/http-rp/cross-origin/http-http/script-tag/generic.keep-origin-redirect.http.html b/testing/web-platform/tests/referrer-policy/origin/http-rp/cross-origin/http-http/script-tag/generic.keep-origin-redirect.http.html
new file mode 100644
index 000000000..8f88eaf53
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/origin/http-rp/cross-origin/http-http/script-tag/generic.keep-origin-redirect.http.html
@@ -0,0 +1,41 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by referrer-policy/generic/tools/generate.py using referrer-policy/generic/template/test.release.html.template. -->
+<html>
+ <head>
+ <title>Referrer-Policy: Referrer Policy is set to 'origin'</title>
+ <meta name="description" content="Check that all subresources in all casses get only the origin portion of the referrer URL.">
+ <!-- No meta: Referrer policy delivered via HTTP headers. -->
+ <link rel="author" title="Kristijan Burnik" href="burnik@chromium.org">
+ <link rel="help" href="https://w3c.github.io/webappsec-referrer-policy/#referrer-policy-origin">
+ <meta name="assert" content="The referrer URL is origin when a
+ document served over http requires an http
+ sub-resource via script-tag using the http-rp
+ delivery method with keep-origin-redirect and when
+ the target request is cross-origin.">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <!-- TODO(kristijanburnik): Minify and merge both: -->
+ <script src="/referrer-policy/generic/common.js"></script>
+ <script src="/referrer-policy/generic/referrer-policy-test-case.js?pipe=sub"></script>
+ </head>
+ <body>
+ <script>
+ ReferrerPolicyTestCase(
+ {
+ "referrer_policy": "origin",
+ "delivery_method": "http-rp",
+ "redirection": "keep-origin-redirect",
+ "origin": "cross-origin",
+ "source_protocol": "http",
+ "target_protocol": "http",
+ "subresource": "script-tag",
+ "subresource_path": "/referrer-policy/generic/subresource/script.py",
+ "referrer_url": "origin"
+ },
+ document.querySelector("meta[name=assert]").content,
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/origin/http-rp/cross-origin/http-http/script-tag/generic.keep-origin-redirect.http.html.headers b/testing/web-platform/tests/referrer-policy/origin/http-rp/cross-origin/http-http/script-tag/generic.keep-origin-redirect.http.html.headers
new file mode 100644
index 000000000..306a53536
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/origin/http-rp/cross-origin/http-http/script-tag/generic.keep-origin-redirect.http.html.headers
@@ -0,0 +1,2 @@
+Referrer-Policy: origin
+Access-Control-Allow-Origin: *
diff --git a/testing/web-platform/tests/referrer-policy/origin/http-rp/cross-origin/http-http/script-tag/generic.no-redirect.http.html b/testing/web-platform/tests/referrer-policy/origin/http-rp/cross-origin/http-http/script-tag/generic.no-redirect.http.html
new file mode 100644
index 000000000..3df62ffab
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/origin/http-rp/cross-origin/http-http/script-tag/generic.no-redirect.http.html
@@ -0,0 +1,41 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by referrer-policy/generic/tools/generate.py using referrer-policy/generic/template/test.release.html.template. -->
+<html>
+ <head>
+ <title>Referrer-Policy: Referrer Policy is set to 'origin'</title>
+ <meta name="description" content="Check that all subresources in all casses get only the origin portion of the referrer URL.">
+ <!-- No meta: Referrer policy delivered via HTTP headers. -->
+ <link rel="author" title="Kristijan Burnik" href="burnik@chromium.org">
+ <link rel="help" href="https://w3c.github.io/webappsec-referrer-policy/#referrer-policy-origin">
+ <meta name="assert" content="The referrer URL is origin when a
+ document served over http requires an http
+ sub-resource via script-tag using the http-rp
+ delivery method with no-redirect and when
+ the target request is cross-origin.">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <!-- TODO(kristijanburnik): Minify and merge both: -->
+ <script src="/referrer-policy/generic/common.js"></script>
+ <script src="/referrer-policy/generic/referrer-policy-test-case.js?pipe=sub"></script>
+ </head>
+ <body>
+ <script>
+ ReferrerPolicyTestCase(
+ {
+ "referrer_policy": "origin",
+ "delivery_method": "http-rp",
+ "redirection": "no-redirect",
+ "origin": "cross-origin",
+ "source_protocol": "http",
+ "target_protocol": "http",
+ "subresource": "script-tag",
+ "subresource_path": "/referrer-policy/generic/subresource/script.py",
+ "referrer_url": "origin"
+ },
+ document.querySelector("meta[name=assert]").content,
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/origin/http-rp/cross-origin/http-http/script-tag/generic.no-redirect.http.html.headers b/testing/web-platform/tests/referrer-policy/origin/http-rp/cross-origin/http-http/script-tag/generic.no-redirect.http.html.headers
new file mode 100644
index 000000000..306a53536
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/origin/http-rp/cross-origin/http-http/script-tag/generic.no-redirect.http.html.headers
@@ -0,0 +1,2 @@
+Referrer-Policy: origin
+Access-Control-Allow-Origin: *
diff --git a/testing/web-platform/tests/referrer-policy/origin/http-rp/cross-origin/http-http/script-tag/generic.swap-origin-redirect.http.html b/testing/web-platform/tests/referrer-policy/origin/http-rp/cross-origin/http-http/script-tag/generic.swap-origin-redirect.http.html
new file mode 100644
index 000000000..f9961c352
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/origin/http-rp/cross-origin/http-http/script-tag/generic.swap-origin-redirect.http.html
@@ -0,0 +1,41 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by referrer-policy/generic/tools/generate.py using referrer-policy/generic/template/test.release.html.template. -->
+<html>
+ <head>
+ <title>Referrer-Policy: Referrer Policy is set to 'origin'</title>
+ <meta name="description" content="Check that all subresources in all casses get only the origin portion of the referrer URL.">
+ <!-- No meta: Referrer policy delivered via HTTP headers. -->
+ <link rel="author" title="Kristijan Burnik" href="burnik@chromium.org">
+ <link rel="help" href="https://w3c.github.io/webappsec-referrer-policy/#referrer-policy-origin">
+ <meta name="assert" content="The referrer URL is origin when a
+ document served over http requires an http
+ sub-resource via script-tag using the http-rp
+ delivery method with swap-origin-redirect and when
+ the target request is cross-origin.">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <!-- TODO(kristijanburnik): Minify and merge both: -->
+ <script src="/referrer-policy/generic/common.js"></script>
+ <script src="/referrer-policy/generic/referrer-policy-test-case.js?pipe=sub"></script>
+ </head>
+ <body>
+ <script>
+ ReferrerPolicyTestCase(
+ {
+ "referrer_policy": "origin",
+ "delivery_method": "http-rp",
+ "redirection": "swap-origin-redirect",
+ "origin": "cross-origin",
+ "source_protocol": "http",
+ "target_protocol": "http",
+ "subresource": "script-tag",
+ "subresource_path": "/referrer-policy/generic/subresource/script.py",
+ "referrer_url": "origin"
+ },
+ document.querySelector("meta[name=assert]").content,
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/origin/http-rp/cross-origin/http-http/script-tag/generic.swap-origin-redirect.http.html.headers b/testing/web-platform/tests/referrer-policy/origin/http-rp/cross-origin/http-http/script-tag/generic.swap-origin-redirect.http.html.headers
new file mode 100644
index 000000000..306a53536
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/origin/http-rp/cross-origin/http-http/script-tag/generic.swap-origin-redirect.http.html.headers
@@ -0,0 +1,2 @@
+Referrer-Policy: origin
+Access-Control-Allow-Origin: *
diff --git a/testing/web-platform/tests/referrer-policy/origin/http-rp/cross-origin/http-http/xhr-request/generic.keep-origin-redirect.http.html b/testing/web-platform/tests/referrer-policy/origin/http-rp/cross-origin/http-http/xhr-request/generic.keep-origin-redirect.http.html
new file mode 100644
index 000000000..4c124d298
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/origin/http-rp/cross-origin/http-http/xhr-request/generic.keep-origin-redirect.http.html
@@ -0,0 +1,41 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by referrer-policy/generic/tools/generate.py using referrer-policy/generic/template/test.release.html.template. -->
+<html>
+ <head>
+ <title>Referrer-Policy: Referrer Policy is set to 'origin'</title>
+ <meta name="description" content="Check that all subresources in all casses get only the origin portion of the referrer URL.">
+ <!-- No meta: Referrer policy delivered via HTTP headers. -->
+ <link rel="author" title="Kristijan Burnik" href="burnik@chromium.org">
+ <link rel="help" href="https://w3c.github.io/webappsec-referrer-policy/#referrer-policy-origin">
+ <meta name="assert" content="The referrer URL is origin when a
+ document served over http requires an http
+ sub-resource via xhr-request using the http-rp
+ delivery method with keep-origin-redirect and when
+ the target request is cross-origin.">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <!-- TODO(kristijanburnik): Minify and merge both: -->
+ <script src="/referrer-policy/generic/common.js"></script>
+ <script src="/referrer-policy/generic/referrer-policy-test-case.js?pipe=sub"></script>
+ </head>
+ <body>
+ <script>
+ ReferrerPolicyTestCase(
+ {
+ "referrer_policy": "origin",
+ "delivery_method": "http-rp",
+ "redirection": "keep-origin-redirect",
+ "origin": "cross-origin",
+ "source_protocol": "http",
+ "target_protocol": "http",
+ "subresource": "xhr-request",
+ "subresource_path": "/referrer-policy/generic/subresource/xhr.py",
+ "referrer_url": "origin"
+ },
+ document.querySelector("meta[name=assert]").content,
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/origin/http-rp/cross-origin/http-http/xhr-request/generic.keep-origin-redirect.http.html.headers b/testing/web-platform/tests/referrer-policy/origin/http-rp/cross-origin/http-http/xhr-request/generic.keep-origin-redirect.http.html.headers
new file mode 100644
index 000000000..306a53536
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/origin/http-rp/cross-origin/http-http/xhr-request/generic.keep-origin-redirect.http.html.headers
@@ -0,0 +1,2 @@
+Referrer-Policy: origin
+Access-Control-Allow-Origin: *
diff --git a/testing/web-platform/tests/referrer-policy/origin/http-rp/cross-origin/http-http/xhr-request/generic.no-redirect.http.html b/testing/web-platform/tests/referrer-policy/origin/http-rp/cross-origin/http-http/xhr-request/generic.no-redirect.http.html
new file mode 100644
index 000000000..29b6635f9
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/origin/http-rp/cross-origin/http-http/xhr-request/generic.no-redirect.http.html
@@ -0,0 +1,41 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by referrer-policy/generic/tools/generate.py using referrer-policy/generic/template/test.release.html.template. -->
+<html>
+ <head>
+ <title>Referrer-Policy: Referrer Policy is set to 'origin'</title>
+ <meta name="description" content="Check that all subresources in all casses get only the origin portion of the referrer URL.">
+ <!-- No meta: Referrer policy delivered via HTTP headers. -->
+ <link rel="author" title="Kristijan Burnik" href="burnik@chromium.org">
+ <link rel="help" href="https://w3c.github.io/webappsec-referrer-policy/#referrer-policy-origin">
+ <meta name="assert" content="The referrer URL is origin when a
+ document served over http requires an http
+ sub-resource via xhr-request using the http-rp
+ delivery method with no-redirect and when
+ the target request is cross-origin.">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <!-- TODO(kristijanburnik): Minify and merge both: -->
+ <script src="/referrer-policy/generic/common.js"></script>
+ <script src="/referrer-policy/generic/referrer-policy-test-case.js?pipe=sub"></script>
+ </head>
+ <body>
+ <script>
+ ReferrerPolicyTestCase(
+ {
+ "referrer_policy": "origin",
+ "delivery_method": "http-rp",
+ "redirection": "no-redirect",
+ "origin": "cross-origin",
+ "source_protocol": "http",
+ "target_protocol": "http",
+ "subresource": "xhr-request",
+ "subresource_path": "/referrer-policy/generic/subresource/xhr.py",
+ "referrer_url": "origin"
+ },
+ document.querySelector("meta[name=assert]").content,
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/origin/http-rp/cross-origin/http-http/xhr-request/generic.no-redirect.http.html.headers b/testing/web-platform/tests/referrer-policy/origin/http-rp/cross-origin/http-http/xhr-request/generic.no-redirect.http.html.headers
new file mode 100644
index 000000000..306a53536
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/origin/http-rp/cross-origin/http-http/xhr-request/generic.no-redirect.http.html.headers
@@ -0,0 +1,2 @@
+Referrer-Policy: origin
+Access-Control-Allow-Origin: *
diff --git a/testing/web-platform/tests/referrer-policy/origin/http-rp/cross-origin/http-http/xhr-request/generic.swap-origin-redirect.http.html b/testing/web-platform/tests/referrer-policy/origin/http-rp/cross-origin/http-http/xhr-request/generic.swap-origin-redirect.http.html
new file mode 100644
index 000000000..501315b2b
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/origin/http-rp/cross-origin/http-http/xhr-request/generic.swap-origin-redirect.http.html
@@ -0,0 +1,41 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by referrer-policy/generic/tools/generate.py using referrer-policy/generic/template/test.release.html.template. -->
+<html>
+ <head>
+ <title>Referrer-Policy: Referrer Policy is set to 'origin'</title>
+ <meta name="description" content="Check that all subresources in all casses get only the origin portion of the referrer URL.">
+ <!-- No meta: Referrer policy delivered via HTTP headers. -->
+ <link rel="author" title="Kristijan Burnik" href="burnik@chromium.org">
+ <link rel="help" href="https://w3c.github.io/webappsec-referrer-policy/#referrer-policy-origin">
+ <meta name="assert" content="The referrer URL is origin when a
+ document served over http requires an http
+ sub-resource via xhr-request using the http-rp
+ delivery method with swap-origin-redirect and when
+ the target request is cross-origin.">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <!-- TODO(kristijanburnik): Minify and merge both: -->
+ <script src="/referrer-policy/generic/common.js"></script>
+ <script src="/referrer-policy/generic/referrer-policy-test-case.js?pipe=sub"></script>
+ </head>
+ <body>
+ <script>
+ ReferrerPolicyTestCase(
+ {
+ "referrer_policy": "origin",
+ "delivery_method": "http-rp",
+ "redirection": "swap-origin-redirect",
+ "origin": "cross-origin",
+ "source_protocol": "http",
+ "target_protocol": "http",
+ "subresource": "xhr-request",
+ "subresource_path": "/referrer-policy/generic/subresource/xhr.py",
+ "referrer_url": "origin"
+ },
+ document.querySelector("meta[name=assert]").content,
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/origin/http-rp/cross-origin/http-http/xhr-request/generic.swap-origin-redirect.http.html.headers b/testing/web-platform/tests/referrer-policy/origin/http-rp/cross-origin/http-http/xhr-request/generic.swap-origin-redirect.http.html.headers
new file mode 100644
index 000000000..306a53536
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/origin/http-rp/cross-origin/http-http/xhr-request/generic.swap-origin-redirect.http.html.headers
@@ -0,0 +1,2 @@
+Referrer-Policy: origin
+Access-Control-Allow-Origin: *
diff --git a/testing/web-platform/tests/referrer-policy/origin/http-rp/cross-origin/http-https/fetch-request/generic.keep-origin-redirect.http.html b/testing/web-platform/tests/referrer-policy/origin/http-rp/cross-origin/http-https/fetch-request/generic.keep-origin-redirect.http.html
new file mode 100644
index 000000000..ddae157a6
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/origin/http-rp/cross-origin/http-https/fetch-request/generic.keep-origin-redirect.http.html
@@ -0,0 +1,41 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by referrer-policy/generic/tools/generate.py using referrer-policy/generic/template/test.release.html.template. -->
+<html>
+ <head>
+ <title>Referrer-Policy: Referrer Policy is set to 'origin'</title>
+ <meta name="description" content="Check that all subresources in all casses get only the origin portion of the referrer URL.">
+ <!-- No meta: Referrer policy delivered via HTTP headers. -->
+ <link rel="author" title="Kristijan Burnik" href="burnik@chromium.org">
+ <link rel="help" href="https://w3c.github.io/webappsec-referrer-policy/#referrer-policy-origin">
+ <meta name="assert" content="The referrer URL is origin when a
+ document served over http requires an https
+ sub-resource via fetch-request using the http-rp
+ delivery method with keep-origin-redirect and when
+ the target request is cross-origin.">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <!-- TODO(kristijanburnik): Minify and merge both: -->
+ <script src="/referrer-policy/generic/common.js"></script>
+ <script src="/referrer-policy/generic/referrer-policy-test-case.js?pipe=sub"></script>
+ </head>
+ <body>
+ <script>
+ ReferrerPolicyTestCase(
+ {
+ "referrer_policy": "origin",
+ "delivery_method": "http-rp",
+ "redirection": "keep-origin-redirect",
+ "origin": "cross-origin",
+ "source_protocol": "http",
+ "target_protocol": "https",
+ "subresource": "fetch-request",
+ "subresource_path": "/referrer-policy/generic/subresource/xhr.py",
+ "referrer_url": "origin"
+ },
+ document.querySelector("meta[name=assert]").content,
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/origin/http-rp/cross-origin/http-https/fetch-request/generic.keep-origin-redirect.http.html.headers b/testing/web-platform/tests/referrer-policy/origin/http-rp/cross-origin/http-https/fetch-request/generic.keep-origin-redirect.http.html.headers
new file mode 100644
index 000000000..306a53536
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/origin/http-rp/cross-origin/http-https/fetch-request/generic.keep-origin-redirect.http.html.headers
@@ -0,0 +1,2 @@
+Referrer-Policy: origin
+Access-Control-Allow-Origin: *
diff --git a/testing/web-platform/tests/referrer-policy/origin/http-rp/cross-origin/http-https/fetch-request/generic.no-redirect.http.html b/testing/web-platform/tests/referrer-policy/origin/http-rp/cross-origin/http-https/fetch-request/generic.no-redirect.http.html
new file mode 100644
index 000000000..b48445413
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/origin/http-rp/cross-origin/http-https/fetch-request/generic.no-redirect.http.html
@@ -0,0 +1,41 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by referrer-policy/generic/tools/generate.py using referrer-policy/generic/template/test.release.html.template. -->
+<html>
+ <head>
+ <title>Referrer-Policy: Referrer Policy is set to 'origin'</title>
+ <meta name="description" content="Check that all subresources in all casses get only the origin portion of the referrer URL.">
+ <!-- No meta: Referrer policy delivered via HTTP headers. -->
+ <link rel="author" title="Kristijan Burnik" href="burnik@chromium.org">
+ <link rel="help" href="https://w3c.github.io/webappsec-referrer-policy/#referrer-policy-origin">
+ <meta name="assert" content="The referrer URL is origin when a
+ document served over http requires an https
+ sub-resource via fetch-request using the http-rp
+ delivery method with no-redirect and when
+ the target request is cross-origin.">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <!-- TODO(kristijanburnik): Minify and merge both: -->
+ <script src="/referrer-policy/generic/common.js"></script>
+ <script src="/referrer-policy/generic/referrer-policy-test-case.js?pipe=sub"></script>
+ </head>
+ <body>
+ <script>
+ ReferrerPolicyTestCase(
+ {
+ "referrer_policy": "origin",
+ "delivery_method": "http-rp",
+ "redirection": "no-redirect",
+ "origin": "cross-origin",
+ "source_protocol": "http",
+ "target_protocol": "https",
+ "subresource": "fetch-request",
+ "subresource_path": "/referrer-policy/generic/subresource/xhr.py",
+ "referrer_url": "origin"
+ },
+ document.querySelector("meta[name=assert]").content,
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/origin/http-rp/cross-origin/http-https/fetch-request/generic.no-redirect.http.html.headers b/testing/web-platform/tests/referrer-policy/origin/http-rp/cross-origin/http-https/fetch-request/generic.no-redirect.http.html.headers
new file mode 100644
index 000000000..306a53536
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/origin/http-rp/cross-origin/http-https/fetch-request/generic.no-redirect.http.html.headers
@@ -0,0 +1,2 @@
+Referrer-Policy: origin
+Access-Control-Allow-Origin: *
diff --git a/testing/web-platform/tests/referrer-policy/origin/http-rp/cross-origin/http-https/fetch-request/generic.swap-origin-redirect.http.html b/testing/web-platform/tests/referrer-policy/origin/http-rp/cross-origin/http-https/fetch-request/generic.swap-origin-redirect.http.html
new file mode 100644
index 000000000..2219a9204
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/origin/http-rp/cross-origin/http-https/fetch-request/generic.swap-origin-redirect.http.html
@@ -0,0 +1,41 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by referrer-policy/generic/tools/generate.py using referrer-policy/generic/template/test.release.html.template. -->
+<html>
+ <head>
+ <title>Referrer-Policy: Referrer Policy is set to 'origin'</title>
+ <meta name="description" content="Check that all subresources in all casses get only the origin portion of the referrer URL.">
+ <!-- No meta: Referrer policy delivered via HTTP headers. -->
+ <link rel="author" title="Kristijan Burnik" href="burnik@chromium.org">
+ <link rel="help" href="https://w3c.github.io/webappsec-referrer-policy/#referrer-policy-origin">
+ <meta name="assert" content="The referrer URL is origin when a
+ document served over http requires an https
+ sub-resource via fetch-request using the http-rp
+ delivery method with swap-origin-redirect and when
+ the target request is cross-origin.">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <!-- TODO(kristijanburnik): Minify and merge both: -->
+ <script src="/referrer-policy/generic/common.js"></script>
+ <script src="/referrer-policy/generic/referrer-policy-test-case.js?pipe=sub"></script>
+ </head>
+ <body>
+ <script>
+ ReferrerPolicyTestCase(
+ {
+ "referrer_policy": "origin",
+ "delivery_method": "http-rp",
+ "redirection": "swap-origin-redirect",
+ "origin": "cross-origin",
+ "source_protocol": "http",
+ "target_protocol": "https",
+ "subresource": "fetch-request",
+ "subresource_path": "/referrer-policy/generic/subresource/xhr.py",
+ "referrer_url": "origin"
+ },
+ document.querySelector("meta[name=assert]").content,
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/origin/http-rp/cross-origin/http-https/fetch-request/generic.swap-origin-redirect.http.html.headers b/testing/web-platform/tests/referrer-policy/origin/http-rp/cross-origin/http-https/fetch-request/generic.swap-origin-redirect.http.html.headers
new file mode 100644
index 000000000..306a53536
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/origin/http-rp/cross-origin/http-https/fetch-request/generic.swap-origin-redirect.http.html.headers
@@ -0,0 +1,2 @@
+Referrer-Policy: origin
+Access-Control-Allow-Origin: *
diff --git a/testing/web-platform/tests/referrer-policy/origin/http-rp/cross-origin/http-https/iframe-tag/generic.keep-origin-redirect.http.html b/testing/web-platform/tests/referrer-policy/origin/http-rp/cross-origin/http-https/iframe-tag/generic.keep-origin-redirect.http.html
new file mode 100644
index 000000000..22559b109
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/origin/http-rp/cross-origin/http-https/iframe-tag/generic.keep-origin-redirect.http.html
@@ -0,0 +1,41 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by referrer-policy/generic/tools/generate.py using referrer-policy/generic/template/test.release.html.template. -->
+<html>
+ <head>
+ <title>Referrer-Policy: Referrer Policy is set to 'origin'</title>
+ <meta name="description" content="Check that all subresources in all casses get only the origin portion of the referrer URL.">
+ <!-- No meta: Referrer policy delivered via HTTP headers. -->
+ <link rel="author" title="Kristijan Burnik" href="burnik@chromium.org">
+ <link rel="help" href="https://w3c.github.io/webappsec-referrer-policy/#referrer-policy-origin">
+ <meta name="assert" content="The referrer URL is origin when a
+ document served over http requires an https
+ sub-resource via iframe-tag using the http-rp
+ delivery method with keep-origin-redirect and when
+ the target request is cross-origin.">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <!-- TODO(kristijanburnik): Minify and merge both: -->
+ <script src="/referrer-policy/generic/common.js"></script>
+ <script src="/referrer-policy/generic/referrer-policy-test-case.js?pipe=sub"></script>
+ </head>
+ <body>
+ <script>
+ ReferrerPolicyTestCase(
+ {
+ "referrer_policy": "origin",
+ "delivery_method": "http-rp",
+ "redirection": "keep-origin-redirect",
+ "origin": "cross-origin",
+ "source_protocol": "http",
+ "target_protocol": "https",
+ "subresource": "iframe-tag",
+ "subresource_path": "/referrer-policy/generic/subresource/document.py",
+ "referrer_url": "origin"
+ },
+ document.querySelector("meta[name=assert]").content,
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/origin/http-rp/cross-origin/http-https/iframe-tag/generic.keep-origin-redirect.http.html.headers b/testing/web-platform/tests/referrer-policy/origin/http-rp/cross-origin/http-https/iframe-tag/generic.keep-origin-redirect.http.html.headers
new file mode 100644
index 000000000..306a53536
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/origin/http-rp/cross-origin/http-https/iframe-tag/generic.keep-origin-redirect.http.html.headers
@@ -0,0 +1,2 @@
+Referrer-Policy: origin
+Access-Control-Allow-Origin: *
diff --git a/testing/web-platform/tests/referrer-policy/origin/http-rp/cross-origin/http-https/iframe-tag/generic.no-redirect.http.html b/testing/web-platform/tests/referrer-policy/origin/http-rp/cross-origin/http-https/iframe-tag/generic.no-redirect.http.html
new file mode 100644
index 000000000..ddfbd4e19
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/origin/http-rp/cross-origin/http-https/iframe-tag/generic.no-redirect.http.html
@@ -0,0 +1,41 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by referrer-policy/generic/tools/generate.py using referrer-policy/generic/template/test.release.html.template. -->
+<html>
+ <head>
+ <title>Referrer-Policy: Referrer Policy is set to 'origin'</title>
+ <meta name="description" content="Check that all subresources in all casses get only the origin portion of the referrer URL.">
+ <!-- No meta: Referrer policy delivered via HTTP headers. -->
+ <link rel="author" title="Kristijan Burnik" href="burnik@chromium.org">
+ <link rel="help" href="https://w3c.github.io/webappsec-referrer-policy/#referrer-policy-origin">
+ <meta name="assert" content="The referrer URL is origin when a
+ document served over http requires an https
+ sub-resource via iframe-tag using the http-rp
+ delivery method with no-redirect and when
+ the target request is cross-origin.">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <!-- TODO(kristijanburnik): Minify and merge both: -->
+ <script src="/referrer-policy/generic/common.js"></script>
+ <script src="/referrer-policy/generic/referrer-policy-test-case.js?pipe=sub"></script>
+ </head>
+ <body>
+ <script>
+ ReferrerPolicyTestCase(
+ {
+ "referrer_policy": "origin",
+ "delivery_method": "http-rp",
+ "redirection": "no-redirect",
+ "origin": "cross-origin",
+ "source_protocol": "http",
+ "target_protocol": "https",
+ "subresource": "iframe-tag",
+ "subresource_path": "/referrer-policy/generic/subresource/document.py",
+ "referrer_url": "origin"
+ },
+ document.querySelector("meta[name=assert]").content,
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/origin/http-rp/cross-origin/http-https/iframe-tag/generic.no-redirect.http.html.headers b/testing/web-platform/tests/referrer-policy/origin/http-rp/cross-origin/http-https/iframe-tag/generic.no-redirect.http.html.headers
new file mode 100644
index 000000000..306a53536
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/origin/http-rp/cross-origin/http-https/iframe-tag/generic.no-redirect.http.html.headers
@@ -0,0 +1,2 @@
+Referrer-Policy: origin
+Access-Control-Allow-Origin: *
diff --git a/testing/web-platform/tests/referrer-policy/origin/http-rp/cross-origin/http-https/iframe-tag/generic.swap-origin-redirect.http.html b/testing/web-platform/tests/referrer-policy/origin/http-rp/cross-origin/http-https/iframe-tag/generic.swap-origin-redirect.http.html
new file mode 100644
index 000000000..23df7f0ad
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/origin/http-rp/cross-origin/http-https/iframe-tag/generic.swap-origin-redirect.http.html
@@ -0,0 +1,41 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by referrer-policy/generic/tools/generate.py using referrer-policy/generic/template/test.release.html.template. -->
+<html>
+ <head>
+ <title>Referrer-Policy: Referrer Policy is set to 'origin'</title>
+ <meta name="description" content="Check that all subresources in all casses get only the origin portion of the referrer URL.">
+ <!-- No meta: Referrer policy delivered via HTTP headers. -->
+ <link rel="author" title="Kristijan Burnik" href="burnik@chromium.org">
+ <link rel="help" href="https://w3c.github.io/webappsec-referrer-policy/#referrer-policy-origin">
+ <meta name="assert" content="The referrer URL is origin when a
+ document served over http requires an https
+ sub-resource via iframe-tag using the http-rp
+ delivery method with swap-origin-redirect and when
+ the target request is cross-origin.">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <!-- TODO(kristijanburnik): Minify and merge both: -->
+ <script src="/referrer-policy/generic/common.js"></script>
+ <script src="/referrer-policy/generic/referrer-policy-test-case.js?pipe=sub"></script>
+ </head>
+ <body>
+ <script>
+ ReferrerPolicyTestCase(
+ {
+ "referrer_policy": "origin",
+ "delivery_method": "http-rp",
+ "redirection": "swap-origin-redirect",
+ "origin": "cross-origin",
+ "source_protocol": "http",
+ "target_protocol": "https",
+ "subresource": "iframe-tag",
+ "subresource_path": "/referrer-policy/generic/subresource/document.py",
+ "referrer_url": "origin"
+ },
+ document.querySelector("meta[name=assert]").content,
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/origin/http-rp/cross-origin/http-https/iframe-tag/generic.swap-origin-redirect.http.html.headers b/testing/web-platform/tests/referrer-policy/origin/http-rp/cross-origin/http-https/iframe-tag/generic.swap-origin-redirect.http.html.headers
new file mode 100644
index 000000000..306a53536
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/origin/http-rp/cross-origin/http-https/iframe-tag/generic.swap-origin-redirect.http.html.headers
@@ -0,0 +1,2 @@
+Referrer-Policy: origin
+Access-Control-Allow-Origin: *
diff --git a/testing/web-platform/tests/referrer-policy/origin/http-rp/cross-origin/http-https/img-tag/generic.keep-origin-redirect.http.html b/testing/web-platform/tests/referrer-policy/origin/http-rp/cross-origin/http-https/img-tag/generic.keep-origin-redirect.http.html
new file mode 100644
index 000000000..767c13872
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/origin/http-rp/cross-origin/http-https/img-tag/generic.keep-origin-redirect.http.html
@@ -0,0 +1,41 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by referrer-policy/generic/tools/generate.py using referrer-policy/generic/template/test.release.html.template. -->
+<html>
+ <head>
+ <title>Referrer-Policy: Referrer Policy is set to 'origin'</title>
+ <meta name="description" content="Check that all subresources in all casses get only the origin portion of the referrer URL.">
+ <!-- No meta: Referrer policy delivered via HTTP headers. -->
+ <link rel="author" title="Kristijan Burnik" href="burnik@chromium.org">
+ <link rel="help" href="https://w3c.github.io/webappsec-referrer-policy/#referrer-policy-origin">
+ <meta name="assert" content="The referrer URL is origin when a
+ document served over http requires an https
+ sub-resource via img-tag using the http-rp
+ delivery method with keep-origin-redirect and when
+ the target request is cross-origin.">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <!-- TODO(kristijanburnik): Minify and merge both: -->
+ <script src="/referrer-policy/generic/common.js"></script>
+ <script src="/referrer-policy/generic/referrer-policy-test-case.js?pipe=sub"></script>
+ </head>
+ <body>
+ <script>
+ ReferrerPolicyTestCase(
+ {
+ "referrer_policy": "origin",
+ "delivery_method": "http-rp",
+ "redirection": "keep-origin-redirect",
+ "origin": "cross-origin",
+ "source_protocol": "http",
+ "target_protocol": "https",
+ "subresource": "img-tag",
+ "subresource_path": "/referrer-policy/generic/subresource/image.py",
+ "referrer_url": "origin"
+ },
+ document.querySelector("meta[name=assert]").content,
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/origin/http-rp/cross-origin/http-https/img-tag/generic.keep-origin-redirect.http.html.headers b/testing/web-platform/tests/referrer-policy/origin/http-rp/cross-origin/http-https/img-tag/generic.keep-origin-redirect.http.html.headers
new file mode 100644
index 000000000..306a53536
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/origin/http-rp/cross-origin/http-https/img-tag/generic.keep-origin-redirect.http.html.headers
@@ -0,0 +1,2 @@
+Referrer-Policy: origin
+Access-Control-Allow-Origin: *
diff --git a/testing/web-platform/tests/referrer-policy/origin/http-rp/cross-origin/http-https/img-tag/generic.no-redirect.http.html b/testing/web-platform/tests/referrer-policy/origin/http-rp/cross-origin/http-https/img-tag/generic.no-redirect.http.html
new file mode 100644
index 000000000..414cae5d6
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/origin/http-rp/cross-origin/http-https/img-tag/generic.no-redirect.http.html
@@ -0,0 +1,41 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by referrer-policy/generic/tools/generate.py using referrer-policy/generic/template/test.release.html.template. -->
+<html>
+ <head>
+ <title>Referrer-Policy: Referrer Policy is set to 'origin'</title>
+ <meta name="description" content="Check that all subresources in all casses get only the origin portion of the referrer URL.">
+ <!-- No meta: Referrer policy delivered via HTTP headers. -->
+ <link rel="author" title="Kristijan Burnik" href="burnik@chromium.org">
+ <link rel="help" href="https://w3c.github.io/webappsec-referrer-policy/#referrer-policy-origin">
+ <meta name="assert" content="The referrer URL is origin when a
+ document served over http requires an https
+ sub-resource via img-tag using the http-rp
+ delivery method with no-redirect and when
+ the target request is cross-origin.">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <!-- TODO(kristijanburnik): Minify and merge both: -->
+ <script src="/referrer-policy/generic/common.js"></script>
+ <script src="/referrer-policy/generic/referrer-policy-test-case.js?pipe=sub"></script>
+ </head>
+ <body>
+ <script>
+ ReferrerPolicyTestCase(
+ {
+ "referrer_policy": "origin",
+ "delivery_method": "http-rp",
+ "redirection": "no-redirect",
+ "origin": "cross-origin",
+ "source_protocol": "http",
+ "target_protocol": "https",
+ "subresource": "img-tag",
+ "subresource_path": "/referrer-policy/generic/subresource/image.py",
+ "referrer_url": "origin"
+ },
+ document.querySelector("meta[name=assert]").content,
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/origin/http-rp/cross-origin/http-https/img-tag/generic.no-redirect.http.html.headers b/testing/web-platform/tests/referrer-policy/origin/http-rp/cross-origin/http-https/img-tag/generic.no-redirect.http.html.headers
new file mode 100644
index 000000000..306a53536
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/origin/http-rp/cross-origin/http-https/img-tag/generic.no-redirect.http.html.headers
@@ -0,0 +1,2 @@
+Referrer-Policy: origin
+Access-Control-Allow-Origin: *
diff --git a/testing/web-platform/tests/referrer-policy/origin/http-rp/cross-origin/http-https/img-tag/generic.swap-origin-redirect.http.html b/testing/web-platform/tests/referrer-policy/origin/http-rp/cross-origin/http-https/img-tag/generic.swap-origin-redirect.http.html
new file mode 100644
index 000000000..081b8b55f
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/origin/http-rp/cross-origin/http-https/img-tag/generic.swap-origin-redirect.http.html
@@ -0,0 +1,41 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by referrer-policy/generic/tools/generate.py using referrer-policy/generic/template/test.release.html.template. -->
+<html>
+ <head>
+ <title>Referrer-Policy: Referrer Policy is set to 'origin'</title>
+ <meta name="description" content="Check that all subresources in all casses get only the origin portion of the referrer URL.">
+ <!-- No meta: Referrer policy delivered via HTTP headers. -->
+ <link rel="author" title="Kristijan Burnik" href="burnik@chromium.org">
+ <link rel="help" href="https://w3c.github.io/webappsec-referrer-policy/#referrer-policy-origin">
+ <meta name="assert" content="The referrer URL is origin when a
+ document served over http requires an https
+ sub-resource via img-tag using the http-rp
+ delivery method with swap-origin-redirect and when
+ the target request is cross-origin.">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <!-- TODO(kristijanburnik): Minify and merge both: -->
+ <script src="/referrer-policy/generic/common.js"></script>
+ <script src="/referrer-policy/generic/referrer-policy-test-case.js?pipe=sub"></script>
+ </head>
+ <body>
+ <script>
+ ReferrerPolicyTestCase(
+ {
+ "referrer_policy": "origin",
+ "delivery_method": "http-rp",
+ "redirection": "swap-origin-redirect",
+ "origin": "cross-origin",
+ "source_protocol": "http",
+ "target_protocol": "https",
+ "subresource": "img-tag",
+ "subresource_path": "/referrer-policy/generic/subresource/image.py",
+ "referrer_url": "origin"
+ },
+ document.querySelector("meta[name=assert]").content,
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/origin/http-rp/cross-origin/http-https/img-tag/generic.swap-origin-redirect.http.html.headers b/testing/web-platform/tests/referrer-policy/origin/http-rp/cross-origin/http-https/img-tag/generic.swap-origin-redirect.http.html.headers
new file mode 100644
index 000000000..306a53536
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/origin/http-rp/cross-origin/http-https/img-tag/generic.swap-origin-redirect.http.html.headers
@@ -0,0 +1,2 @@
+Referrer-Policy: origin
+Access-Control-Allow-Origin: *
diff --git a/testing/web-platform/tests/referrer-policy/origin/http-rp/cross-origin/http-https/script-tag/generic.keep-origin-redirect.http.html b/testing/web-platform/tests/referrer-policy/origin/http-rp/cross-origin/http-https/script-tag/generic.keep-origin-redirect.http.html
new file mode 100644
index 000000000..fd3a69a85
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/origin/http-rp/cross-origin/http-https/script-tag/generic.keep-origin-redirect.http.html
@@ -0,0 +1,41 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by referrer-policy/generic/tools/generate.py using referrer-policy/generic/template/test.release.html.template. -->
+<html>
+ <head>
+ <title>Referrer-Policy: Referrer Policy is set to 'origin'</title>
+ <meta name="description" content="Check that all subresources in all casses get only the origin portion of the referrer URL.">
+ <!-- No meta: Referrer policy delivered via HTTP headers. -->
+ <link rel="author" title="Kristijan Burnik" href="burnik@chromium.org">
+ <link rel="help" href="https://w3c.github.io/webappsec-referrer-policy/#referrer-policy-origin">
+ <meta name="assert" content="The referrer URL is origin when a
+ document served over http requires an https
+ sub-resource via script-tag using the http-rp
+ delivery method with keep-origin-redirect and when
+ the target request is cross-origin.">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <!-- TODO(kristijanburnik): Minify and merge both: -->
+ <script src="/referrer-policy/generic/common.js"></script>
+ <script src="/referrer-policy/generic/referrer-policy-test-case.js?pipe=sub"></script>
+ </head>
+ <body>
+ <script>
+ ReferrerPolicyTestCase(
+ {
+ "referrer_policy": "origin",
+ "delivery_method": "http-rp",
+ "redirection": "keep-origin-redirect",
+ "origin": "cross-origin",
+ "source_protocol": "http",
+ "target_protocol": "https",
+ "subresource": "script-tag",
+ "subresource_path": "/referrer-policy/generic/subresource/script.py",
+ "referrer_url": "origin"
+ },
+ document.querySelector("meta[name=assert]").content,
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/origin/http-rp/cross-origin/http-https/script-tag/generic.keep-origin-redirect.http.html.headers b/testing/web-platform/tests/referrer-policy/origin/http-rp/cross-origin/http-https/script-tag/generic.keep-origin-redirect.http.html.headers
new file mode 100644
index 000000000..306a53536
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/origin/http-rp/cross-origin/http-https/script-tag/generic.keep-origin-redirect.http.html.headers
@@ -0,0 +1,2 @@
+Referrer-Policy: origin
+Access-Control-Allow-Origin: *
diff --git a/testing/web-platform/tests/referrer-policy/origin/http-rp/cross-origin/http-https/script-tag/generic.no-redirect.http.html b/testing/web-platform/tests/referrer-policy/origin/http-rp/cross-origin/http-https/script-tag/generic.no-redirect.http.html
new file mode 100644
index 000000000..65a3a5326
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/origin/http-rp/cross-origin/http-https/script-tag/generic.no-redirect.http.html
@@ -0,0 +1,41 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by referrer-policy/generic/tools/generate.py using referrer-policy/generic/template/test.release.html.template. -->
+<html>
+ <head>
+ <title>Referrer-Policy: Referrer Policy is set to 'origin'</title>
+ <meta name="description" content="Check that all subresources in all casses get only the origin portion of the referrer URL.">
+ <!-- No meta: Referrer policy delivered via HTTP headers. -->
+ <link rel="author" title="Kristijan Burnik" href="burnik@chromium.org">
+ <link rel="help" href="https://w3c.github.io/webappsec-referrer-policy/#referrer-policy-origin">
+ <meta name="assert" content="The referrer URL is origin when a
+ document served over http requires an https
+ sub-resource via script-tag using the http-rp
+ delivery method with no-redirect and when
+ the target request is cross-origin.">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <!-- TODO(kristijanburnik): Minify and merge both: -->
+ <script src="/referrer-policy/generic/common.js"></script>
+ <script src="/referrer-policy/generic/referrer-policy-test-case.js?pipe=sub"></script>
+ </head>
+ <body>
+ <script>
+ ReferrerPolicyTestCase(
+ {
+ "referrer_policy": "origin",
+ "delivery_method": "http-rp",
+ "redirection": "no-redirect",
+ "origin": "cross-origin",
+ "source_protocol": "http",
+ "target_protocol": "https",
+ "subresource": "script-tag",
+ "subresource_path": "/referrer-policy/generic/subresource/script.py",
+ "referrer_url": "origin"
+ },
+ document.querySelector("meta[name=assert]").content,
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/origin/http-rp/cross-origin/http-https/script-tag/generic.no-redirect.http.html.headers b/testing/web-platform/tests/referrer-policy/origin/http-rp/cross-origin/http-https/script-tag/generic.no-redirect.http.html.headers
new file mode 100644
index 000000000..306a53536
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/origin/http-rp/cross-origin/http-https/script-tag/generic.no-redirect.http.html.headers
@@ -0,0 +1,2 @@
+Referrer-Policy: origin
+Access-Control-Allow-Origin: *
diff --git a/testing/web-platform/tests/referrer-policy/origin/http-rp/cross-origin/http-https/script-tag/generic.swap-origin-redirect.http.html b/testing/web-platform/tests/referrer-policy/origin/http-rp/cross-origin/http-https/script-tag/generic.swap-origin-redirect.http.html
new file mode 100644
index 000000000..6fb1b31b1
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/origin/http-rp/cross-origin/http-https/script-tag/generic.swap-origin-redirect.http.html
@@ -0,0 +1,41 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by referrer-policy/generic/tools/generate.py using referrer-policy/generic/template/test.release.html.template. -->
+<html>
+ <head>
+ <title>Referrer-Policy: Referrer Policy is set to 'origin'</title>
+ <meta name="description" content="Check that all subresources in all casses get only the origin portion of the referrer URL.">
+ <!-- No meta: Referrer policy delivered via HTTP headers. -->
+ <link rel="author" title="Kristijan Burnik" href="burnik@chromium.org">
+ <link rel="help" href="https://w3c.github.io/webappsec-referrer-policy/#referrer-policy-origin">
+ <meta name="assert" content="The referrer URL is origin when a
+ document served over http requires an https
+ sub-resource via script-tag using the http-rp
+ delivery method with swap-origin-redirect and when
+ the target request is cross-origin.">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <!-- TODO(kristijanburnik): Minify and merge both: -->
+ <script src="/referrer-policy/generic/common.js"></script>
+ <script src="/referrer-policy/generic/referrer-policy-test-case.js?pipe=sub"></script>
+ </head>
+ <body>
+ <script>
+ ReferrerPolicyTestCase(
+ {
+ "referrer_policy": "origin",
+ "delivery_method": "http-rp",
+ "redirection": "swap-origin-redirect",
+ "origin": "cross-origin",
+ "source_protocol": "http",
+ "target_protocol": "https",
+ "subresource": "script-tag",
+ "subresource_path": "/referrer-policy/generic/subresource/script.py",
+ "referrer_url": "origin"
+ },
+ document.querySelector("meta[name=assert]").content,
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/origin/http-rp/cross-origin/http-https/script-tag/generic.swap-origin-redirect.http.html.headers b/testing/web-platform/tests/referrer-policy/origin/http-rp/cross-origin/http-https/script-tag/generic.swap-origin-redirect.http.html.headers
new file mode 100644
index 000000000..306a53536
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/origin/http-rp/cross-origin/http-https/script-tag/generic.swap-origin-redirect.http.html.headers
@@ -0,0 +1,2 @@
+Referrer-Policy: origin
+Access-Control-Allow-Origin: *
diff --git a/testing/web-platform/tests/referrer-policy/origin/http-rp/cross-origin/http-https/xhr-request/generic.keep-origin-redirect.http.html b/testing/web-platform/tests/referrer-policy/origin/http-rp/cross-origin/http-https/xhr-request/generic.keep-origin-redirect.http.html
new file mode 100644
index 000000000..d8ff89441
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/origin/http-rp/cross-origin/http-https/xhr-request/generic.keep-origin-redirect.http.html
@@ -0,0 +1,41 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by referrer-policy/generic/tools/generate.py using referrer-policy/generic/template/test.release.html.template. -->
+<html>
+ <head>
+ <title>Referrer-Policy: Referrer Policy is set to 'origin'</title>
+ <meta name="description" content="Check that all subresources in all casses get only the origin portion of the referrer URL.">
+ <!-- No meta: Referrer policy delivered via HTTP headers. -->
+ <link rel="author" title="Kristijan Burnik" href="burnik@chromium.org">
+ <link rel="help" href="https://w3c.github.io/webappsec-referrer-policy/#referrer-policy-origin">
+ <meta name="assert" content="The referrer URL is origin when a
+ document served over http requires an https
+ sub-resource via xhr-request using the http-rp
+ delivery method with keep-origin-redirect and when
+ the target request is cross-origin.">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <!-- TODO(kristijanburnik): Minify and merge both: -->
+ <script src="/referrer-policy/generic/common.js"></script>
+ <script src="/referrer-policy/generic/referrer-policy-test-case.js?pipe=sub"></script>
+ </head>
+ <body>
+ <script>
+ ReferrerPolicyTestCase(
+ {
+ "referrer_policy": "origin",
+ "delivery_method": "http-rp",
+ "redirection": "keep-origin-redirect",
+ "origin": "cross-origin",
+ "source_protocol": "http",
+ "target_protocol": "https",
+ "subresource": "xhr-request",
+ "subresource_path": "/referrer-policy/generic/subresource/xhr.py",
+ "referrer_url": "origin"
+ },
+ document.querySelector("meta[name=assert]").content,
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/origin/http-rp/cross-origin/http-https/xhr-request/generic.keep-origin-redirect.http.html.headers b/testing/web-platform/tests/referrer-policy/origin/http-rp/cross-origin/http-https/xhr-request/generic.keep-origin-redirect.http.html.headers
new file mode 100644
index 000000000..306a53536
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/origin/http-rp/cross-origin/http-https/xhr-request/generic.keep-origin-redirect.http.html.headers
@@ -0,0 +1,2 @@
+Referrer-Policy: origin
+Access-Control-Allow-Origin: *
diff --git a/testing/web-platform/tests/referrer-policy/origin/http-rp/cross-origin/http-https/xhr-request/generic.no-redirect.http.html b/testing/web-platform/tests/referrer-policy/origin/http-rp/cross-origin/http-https/xhr-request/generic.no-redirect.http.html
new file mode 100644
index 000000000..58fbc4829
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/origin/http-rp/cross-origin/http-https/xhr-request/generic.no-redirect.http.html
@@ -0,0 +1,41 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by referrer-policy/generic/tools/generate.py using referrer-policy/generic/template/test.release.html.template. -->
+<html>
+ <head>
+ <title>Referrer-Policy: Referrer Policy is set to 'origin'</title>
+ <meta name="description" content="Check that all subresources in all casses get only the origin portion of the referrer URL.">
+ <!-- No meta: Referrer policy delivered via HTTP headers. -->
+ <link rel="author" title="Kristijan Burnik" href="burnik@chromium.org">
+ <link rel="help" href="https://w3c.github.io/webappsec-referrer-policy/#referrer-policy-origin">
+ <meta name="assert" content="The referrer URL is origin when a
+ document served over http requires an https
+ sub-resource via xhr-request using the http-rp
+ delivery method with no-redirect and when
+ the target request is cross-origin.">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <!-- TODO(kristijanburnik): Minify and merge both: -->
+ <script src="/referrer-policy/generic/common.js"></script>
+ <script src="/referrer-policy/generic/referrer-policy-test-case.js?pipe=sub"></script>
+ </head>
+ <body>
+ <script>
+ ReferrerPolicyTestCase(
+ {
+ "referrer_policy": "origin",
+ "delivery_method": "http-rp",
+ "redirection": "no-redirect",
+ "origin": "cross-origin",
+ "source_protocol": "http",
+ "target_protocol": "https",
+ "subresource": "xhr-request",
+ "subresource_path": "/referrer-policy/generic/subresource/xhr.py",
+ "referrer_url": "origin"
+ },
+ document.querySelector("meta[name=assert]").content,
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/origin/http-rp/cross-origin/http-https/xhr-request/generic.no-redirect.http.html.headers b/testing/web-platform/tests/referrer-policy/origin/http-rp/cross-origin/http-https/xhr-request/generic.no-redirect.http.html.headers
new file mode 100644
index 000000000..306a53536
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/origin/http-rp/cross-origin/http-https/xhr-request/generic.no-redirect.http.html.headers
@@ -0,0 +1,2 @@
+Referrer-Policy: origin
+Access-Control-Allow-Origin: *
diff --git a/testing/web-platform/tests/referrer-policy/origin/http-rp/cross-origin/http-https/xhr-request/generic.swap-origin-redirect.http.html b/testing/web-platform/tests/referrer-policy/origin/http-rp/cross-origin/http-https/xhr-request/generic.swap-origin-redirect.http.html
new file mode 100644
index 000000000..229787117
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/origin/http-rp/cross-origin/http-https/xhr-request/generic.swap-origin-redirect.http.html
@@ -0,0 +1,41 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by referrer-policy/generic/tools/generate.py using referrer-policy/generic/template/test.release.html.template. -->
+<html>
+ <head>
+ <title>Referrer-Policy: Referrer Policy is set to 'origin'</title>
+ <meta name="description" content="Check that all subresources in all casses get only the origin portion of the referrer URL.">
+ <!-- No meta: Referrer policy delivered via HTTP headers. -->
+ <link rel="author" title="Kristijan Burnik" href="burnik@chromium.org">
+ <link rel="help" href="https://w3c.github.io/webappsec-referrer-policy/#referrer-policy-origin">
+ <meta name="assert" content="The referrer URL is origin when a
+ document served over http requires an https
+ sub-resource via xhr-request using the http-rp
+ delivery method with swap-origin-redirect and when
+ the target request is cross-origin.">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <!-- TODO(kristijanburnik): Minify and merge both: -->
+ <script src="/referrer-policy/generic/common.js"></script>
+ <script src="/referrer-policy/generic/referrer-policy-test-case.js?pipe=sub"></script>
+ </head>
+ <body>
+ <script>
+ ReferrerPolicyTestCase(
+ {
+ "referrer_policy": "origin",
+ "delivery_method": "http-rp",
+ "redirection": "swap-origin-redirect",
+ "origin": "cross-origin",
+ "source_protocol": "http",
+ "target_protocol": "https",
+ "subresource": "xhr-request",
+ "subresource_path": "/referrer-policy/generic/subresource/xhr.py",
+ "referrer_url": "origin"
+ },
+ document.querySelector("meta[name=assert]").content,
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/origin/http-rp/cross-origin/http-https/xhr-request/generic.swap-origin-redirect.http.html.headers b/testing/web-platform/tests/referrer-policy/origin/http-rp/cross-origin/http-https/xhr-request/generic.swap-origin-redirect.http.html.headers
new file mode 100644
index 000000000..306a53536
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/origin/http-rp/cross-origin/http-https/xhr-request/generic.swap-origin-redirect.http.html.headers
@@ -0,0 +1,2 @@
+Referrer-Policy: origin
+Access-Control-Allow-Origin: *
diff --git a/testing/web-platform/tests/referrer-policy/origin/http-rp/same-origin/http-http/fetch-request/generic.keep-origin-redirect.http.html b/testing/web-platform/tests/referrer-policy/origin/http-rp/same-origin/http-http/fetch-request/generic.keep-origin-redirect.http.html
new file mode 100644
index 000000000..2a421f846
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/origin/http-rp/same-origin/http-http/fetch-request/generic.keep-origin-redirect.http.html
@@ -0,0 +1,41 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by referrer-policy/generic/tools/generate.py using referrer-policy/generic/template/test.release.html.template. -->
+<html>
+ <head>
+ <title>Referrer-Policy: Referrer Policy is set to 'origin'</title>
+ <meta name="description" content="Check that all subresources in all casses get only the origin portion of the referrer URL.">
+ <!-- No meta: Referrer policy delivered via HTTP headers. -->
+ <link rel="author" title="Kristijan Burnik" href="burnik@chromium.org">
+ <link rel="help" href="https://w3c.github.io/webappsec-referrer-policy/#referrer-policy-origin">
+ <meta name="assert" content="The referrer URL is origin when a
+ document served over http requires an http
+ sub-resource via fetch-request using the http-rp
+ delivery method with keep-origin-redirect and when
+ the target request is same-origin.">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <!-- TODO(kristijanburnik): Minify and merge both: -->
+ <script src="/referrer-policy/generic/common.js"></script>
+ <script src="/referrer-policy/generic/referrer-policy-test-case.js?pipe=sub"></script>
+ </head>
+ <body>
+ <script>
+ ReferrerPolicyTestCase(
+ {
+ "referrer_policy": "origin",
+ "delivery_method": "http-rp",
+ "redirection": "keep-origin-redirect",
+ "origin": "same-origin",
+ "source_protocol": "http",
+ "target_protocol": "http",
+ "subresource": "fetch-request",
+ "subresource_path": "/referrer-policy/generic/subresource/xhr.py",
+ "referrer_url": "origin"
+ },
+ document.querySelector("meta[name=assert]").content,
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/origin/http-rp/same-origin/http-http/fetch-request/generic.keep-origin-redirect.http.html.headers b/testing/web-platform/tests/referrer-policy/origin/http-rp/same-origin/http-http/fetch-request/generic.keep-origin-redirect.http.html.headers
new file mode 100644
index 000000000..306a53536
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/origin/http-rp/same-origin/http-http/fetch-request/generic.keep-origin-redirect.http.html.headers
@@ -0,0 +1,2 @@
+Referrer-Policy: origin
+Access-Control-Allow-Origin: *
diff --git a/testing/web-platform/tests/referrer-policy/origin/http-rp/same-origin/http-http/fetch-request/generic.no-redirect.http.html b/testing/web-platform/tests/referrer-policy/origin/http-rp/same-origin/http-http/fetch-request/generic.no-redirect.http.html
new file mode 100644
index 000000000..df23d02dd
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/origin/http-rp/same-origin/http-http/fetch-request/generic.no-redirect.http.html
@@ -0,0 +1,41 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by referrer-policy/generic/tools/generate.py using referrer-policy/generic/template/test.release.html.template. -->
+<html>
+ <head>
+ <title>Referrer-Policy: Referrer Policy is set to 'origin'</title>
+ <meta name="description" content="Check that all subresources in all casses get only the origin portion of the referrer URL.">
+ <!-- No meta: Referrer policy delivered via HTTP headers. -->
+ <link rel="author" title="Kristijan Burnik" href="burnik@chromium.org">
+ <link rel="help" href="https://w3c.github.io/webappsec-referrer-policy/#referrer-policy-origin">
+ <meta name="assert" content="The referrer URL is origin when a
+ document served over http requires an http
+ sub-resource via fetch-request using the http-rp
+ delivery method with no-redirect and when
+ the target request is same-origin.">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <!-- TODO(kristijanburnik): Minify and merge both: -->
+ <script src="/referrer-policy/generic/common.js"></script>
+ <script src="/referrer-policy/generic/referrer-policy-test-case.js?pipe=sub"></script>
+ </head>
+ <body>
+ <script>
+ ReferrerPolicyTestCase(
+ {
+ "referrer_policy": "origin",
+ "delivery_method": "http-rp",
+ "redirection": "no-redirect",
+ "origin": "same-origin",
+ "source_protocol": "http",
+ "target_protocol": "http",
+ "subresource": "fetch-request",
+ "subresource_path": "/referrer-policy/generic/subresource/xhr.py",
+ "referrer_url": "origin"
+ },
+ document.querySelector("meta[name=assert]").content,
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/origin/http-rp/same-origin/http-http/fetch-request/generic.no-redirect.http.html.headers b/testing/web-platform/tests/referrer-policy/origin/http-rp/same-origin/http-http/fetch-request/generic.no-redirect.http.html.headers
new file mode 100644
index 000000000..306a53536
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/origin/http-rp/same-origin/http-http/fetch-request/generic.no-redirect.http.html.headers
@@ -0,0 +1,2 @@
+Referrer-Policy: origin
+Access-Control-Allow-Origin: *
diff --git a/testing/web-platform/tests/referrer-policy/origin/http-rp/same-origin/http-http/fetch-request/generic.swap-origin-redirect.http.html b/testing/web-platform/tests/referrer-policy/origin/http-rp/same-origin/http-http/fetch-request/generic.swap-origin-redirect.http.html
new file mode 100644
index 000000000..0098e8f3e
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/origin/http-rp/same-origin/http-http/fetch-request/generic.swap-origin-redirect.http.html
@@ -0,0 +1,41 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by referrer-policy/generic/tools/generate.py using referrer-policy/generic/template/test.release.html.template. -->
+<html>
+ <head>
+ <title>Referrer-Policy: Referrer Policy is set to 'origin'</title>
+ <meta name="description" content="Check that all subresources in all casses get only the origin portion of the referrer URL.">
+ <!-- No meta: Referrer policy delivered via HTTP headers. -->
+ <link rel="author" title="Kristijan Burnik" href="burnik@chromium.org">
+ <link rel="help" href="https://w3c.github.io/webappsec-referrer-policy/#referrer-policy-origin">
+ <meta name="assert" content="The referrer URL is origin when a
+ document served over http requires an http
+ sub-resource via fetch-request using the http-rp
+ delivery method with swap-origin-redirect and when
+ the target request is same-origin.">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <!-- TODO(kristijanburnik): Minify and merge both: -->
+ <script src="/referrer-policy/generic/common.js"></script>
+ <script src="/referrer-policy/generic/referrer-policy-test-case.js?pipe=sub"></script>
+ </head>
+ <body>
+ <script>
+ ReferrerPolicyTestCase(
+ {
+ "referrer_policy": "origin",
+ "delivery_method": "http-rp",
+ "redirection": "swap-origin-redirect",
+ "origin": "same-origin",
+ "source_protocol": "http",
+ "target_protocol": "http",
+ "subresource": "fetch-request",
+ "subresource_path": "/referrer-policy/generic/subresource/xhr.py",
+ "referrer_url": "origin"
+ },
+ document.querySelector("meta[name=assert]").content,
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/origin/http-rp/same-origin/http-http/fetch-request/generic.swap-origin-redirect.http.html.headers b/testing/web-platform/tests/referrer-policy/origin/http-rp/same-origin/http-http/fetch-request/generic.swap-origin-redirect.http.html.headers
new file mode 100644
index 000000000..306a53536
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/origin/http-rp/same-origin/http-http/fetch-request/generic.swap-origin-redirect.http.html.headers
@@ -0,0 +1,2 @@
+Referrer-Policy: origin
+Access-Control-Allow-Origin: *
diff --git a/testing/web-platform/tests/referrer-policy/origin/http-rp/same-origin/http-http/iframe-tag/generic.keep-origin-redirect.http.html b/testing/web-platform/tests/referrer-policy/origin/http-rp/same-origin/http-http/iframe-tag/generic.keep-origin-redirect.http.html
new file mode 100644
index 000000000..6254fb8c7
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/origin/http-rp/same-origin/http-http/iframe-tag/generic.keep-origin-redirect.http.html
@@ -0,0 +1,41 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by referrer-policy/generic/tools/generate.py using referrer-policy/generic/template/test.release.html.template. -->
+<html>
+ <head>
+ <title>Referrer-Policy: Referrer Policy is set to 'origin'</title>
+ <meta name="description" content="Check that all subresources in all casses get only the origin portion of the referrer URL.">
+ <!-- No meta: Referrer policy delivered via HTTP headers. -->
+ <link rel="author" title="Kristijan Burnik" href="burnik@chromium.org">
+ <link rel="help" href="https://w3c.github.io/webappsec-referrer-policy/#referrer-policy-origin">
+ <meta name="assert" content="The referrer URL is origin when a
+ document served over http requires an http
+ sub-resource via iframe-tag using the http-rp
+ delivery method with keep-origin-redirect and when
+ the target request is same-origin.">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <!-- TODO(kristijanburnik): Minify and merge both: -->
+ <script src="/referrer-policy/generic/common.js"></script>
+ <script src="/referrer-policy/generic/referrer-policy-test-case.js?pipe=sub"></script>
+ </head>
+ <body>
+ <script>
+ ReferrerPolicyTestCase(
+ {
+ "referrer_policy": "origin",
+ "delivery_method": "http-rp",
+ "redirection": "keep-origin-redirect",
+ "origin": "same-origin",
+ "source_protocol": "http",
+ "target_protocol": "http",
+ "subresource": "iframe-tag",
+ "subresource_path": "/referrer-policy/generic/subresource/document.py",
+ "referrer_url": "origin"
+ },
+ document.querySelector("meta[name=assert]").content,
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/origin/http-rp/same-origin/http-http/iframe-tag/generic.keep-origin-redirect.http.html.headers b/testing/web-platform/tests/referrer-policy/origin/http-rp/same-origin/http-http/iframe-tag/generic.keep-origin-redirect.http.html.headers
new file mode 100644
index 000000000..306a53536
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/origin/http-rp/same-origin/http-http/iframe-tag/generic.keep-origin-redirect.http.html.headers
@@ -0,0 +1,2 @@
+Referrer-Policy: origin
+Access-Control-Allow-Origin: *
diff --git a/testing/web-platform/tests/referrer-policy/origin/http-rp/same-origin/http-http/iframe-tag/generic.no-redirect.http.html b/testing/web-platform/tests/referrer-policy/origin/http-rp/same-origin/http-http/iframe-tag/generic.no-redirect.http.html
new file mode 100644
index 000000000..8454f0665
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/origin/http-rp/same-origin/http-http/iframe-tag/generic.no-redirect.http.html
@@ -0,0 +1,41 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by referrer-policy/generic/tools/generate.py using referrer-policy/generic/template/test.release.html.template. -->
+<html>
+ <head>
+ <title>Referrer-Policy: Referrer Policy is set to 'origin'</title>
+ <meta name="description" content="Check that all subresources in all casses get only the origin portion of the referrer URL.">
+ <!-- No meta: Referrer policy delivered via HTTP headers. -->
+ <link rel="author" title="Kristijan Burnik" href="burnik@chromium.org">
+ <link rel="help" href="https://w3c.github.io/webappsec-referrer-policy/#referrer-policy-origin">
+ <meta name="assert" content="The referrer URL is origin when a
+ document served over http requires an http
+ sub-resource via iframe-tag using the http-rp
+ delivery method with no-redirect and when
+ the target request is same-origin.">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <!-- TODO(kristijanburnik): Minify and merge both: -->
+ <script src="/referrer-policy/generic/common.js"></script>
+ <script src="/referrer-policy/generic/referrer-policy-test-case.js?pipe=sub"></script>
+ </head>
+ <body>
+ <script>
+ ReferrerPolicyTestCase(
+ {
+ "referrer_policy": "origin",
+ "delivery_method": "http-rp",
+ "redirection": "no-redirect",
+ "origin": "same-origin",
+ "source_protocol": "http",
+ "target_protocol": "http",
+ "subresource": "iframe-tag",
+ "subresource_path": "/referrer-policy/generic/subresource/document.py",
+ "referrer_url": "origin"
+ },
+ document.querySelector("meta[name=assert]").content,
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/origin/http-rp/same-origin/http-http/iframe-tag/generic.no-redirect.http.html.headers b/testing/web-platform/tests/referrer-policy/origin/http-rp/same-origin/http-http/iframe-tag/generic.no-redirect.http.html.headers
new file mode 100644
index 000000000..306a53536
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/origin/http-rp/same-origin/http-http/iframe-tag/generic.no-redirect.http.html.headers
@@ -0,0 +1,2 @@
+Referrer-Policy: origin
+Access-Control-Allow-Origin: *
diff --git a/testing/web-platform/tests/referrer-policy/origin/http-rp/same-origin/http-http/iframe-tag/generic.swap-origin-redirect.http.html b/testing/web-platform/tests/referrer-policy/origin/http-rp/same-origin/http-http/iframe-tag/generic.swap-origin-redirect.http.html
new file mode 100644
index 000000000..381737def
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/origin/http-rp/same-origin/http-http/iframe-tag/generic.swap-origin-redirect.http.html
@@ -0,0 +1,41 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by referrer-policy/generic/tools/generate.py using referrer-policy/generic/template/test.release.html.template. -->
+<html>
+ <head>
+ <title>Referrer-Policy: Referrer Policy is set to 'origin'</title>
+ <meta name="description" content="Check that all subresources in all casses get only the origin portion of the referrer URL.">
+ <!-- No meta: Referrer policy delivered via HTTP headers. -->
+ <link rel="author" title="Kristijan Burnik" href="burnik@chromium.org">
+ <link rel="help" href="https://w3c.github.io/webappsec-referrer-policy/#referrer-policy-origin">
+ <meta name="assert" content="The referrer URL is origin when a
+ document served over http requires an http
+ sub-resource via iframe-tag using the http-rp
+ delivery method with swap-origin-redirect and when
+ the target request is same-origin.">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <!-- TODO(kristijanburnik): Minify and merge both: -->
+ <script src="/referrer-policy/generic/common.js"></script>
+ <script src="/referrer-policy/generic/referrer-policy-test-case.js?pipe=sub"></script>
+ </head>
+ <body>
+ <script>
+ ReferrerPolicyTestCase(
+ {
+ "referrer_policy": "origin",
+ "delivery_method": "http-rp",
+ "redirection": "swap-origin-redirect",
+ "origin": "same-origin",
+ "source_protocol": "http",
+ "target_protocol": "http",
+ "subresource": "iframe-tag",
+ "subresource_path": "/referrer-policy/generic/subresource/document.py",
+ "referrer_url": "origin"
+ },
+ document.querySelector("meta[name=assert]").content,
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/origin/http-rp/same-origin/http-http/iframe-tag/generic.swap-origin-redirect.http.html.headers b/testing/web-platform/tests/referrer-policy/origin/http-rp/same-origin/http-http/iframe-tag/generic.swap-origin-redirect.http.html.headers
new file mode 100644
index 000000000..306a53536
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/origin/http-rp/same-origin/http-http/iframe-tag/generic.swap-origin-redirect.http.html.headers
@@ -0,0 +1,2 @@
+Referrer-Policy: origin
+Access-Control-Allow-Origin: *
diff --git a/testing/web-platform/tests/referrer-policy/origin/http-rp/same-origin/http-http/img-tag/generic.keep-origin-redirect.http.html b/testing/web-platform/tests/referrer-policy/origin/http-rp/same-origin/http-http/img-tag/generic.keep-origin-redirect.http.html
new file mode 100644
index 000000000..7b600cbbd
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/origin/http-rp/same-origin/http-http/img-tag/generic.keep-origin-redirect.http.html
@@ -0,0 +1,41 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by referrer-policy/generic/tools/generate.py using referrer-policy/generic/template/test.release.html.template. -->
+<html>
+ <head>
+ <title>Referrer-Policy: Referrer Policy is set to 'origin'</title>
+ <meta name="description" content="Check that all subresources in all casses get only the origin portion of the referrer URL.">
+ <!-- No meta: Referrer policy delivered via HTTP headers. -->
+ <link rel="author" title="Kristijan Burnik" href="burnik@chromium.org">
+ <link rel="help" href="https://w3c.github.io/webappsec-referrer-policy/#referrer-policy-origin">
+ <meta name="assert" content="The referrer URL is origin when a
+ document served over http requires an http
+ sub-resource via img-tag using the http-rp
+ delivery method with keep-origin-redirect and when
+ the target request is same-origin.">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <!-- TODO(kristijanburnik): Minify and merge both: -->
+ <script src="/referrer-policy/generic/common.js"></script>
+ <script src="/referrer-policy/generic/referrer-policy-test-case.js?pipe=sub"></script>
+ </head>
+ <body>
+ <script>
+ ReferrerPolicyTestCase(
+ {
+ "referrer_policy": "origin",
+ "delivery_method": "http-rp",
+ "redirection": "keep-origin-redirect",
+ "origin": "same-origin",
+ "source_protocol": "http",
+ "target_protocol": "http",
+ "subresource": "img-tag",
+ "subresource_path": "/referrer-policy/generic/subresource/image.py",
+ "referrer_url": "origin"
+ },
+ document.querySelector("meta[name=assert]").content,
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/origin/http-rp/same-origin/http-http/img-tag/generic.keep-origin-redirect.http.html.headers b/testing/web-platform/tests/referrer-policy/origin/http-rp/same-origin/http-http/img-tag/generic.keep-origin-redirect.http.html.headers
new file mode 100644
index 000000000..306a53536
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/origin/http-rp/same-origin/http-http/img-tag/generic.keep-origin-redirect.http.html.headers
@@ -0,0 +1,2 @@
+Referrer-Policy: origin
+Access-Control-Allow-Origin: *
diff --git a/testing/web-platform/tests/referrer-policy/origin/http-rp/same-origin/http-http/img-tag/generic.no-redirect.http.html b/testing/web-platform/tests/referrer-policy/origin/http-rp/same-origin/http-http/img-tag/generic.no-redirect.http.html
new file mode 100644
index 000000000..f6631d884
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/origin/http-rp/same-origin/http-http/img-tag/generic.no-redirect.http.html
@@ -0,0 +1,41 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by referrer-policy/generic/tools/generate.py using referrer-policy/generic/template/test.release.html.template. -->
+<html>
+ <head>
+ <title>Referrer-Policy: Referrer Policy is set to 'origin'</title>
+ <meta name="description" content="Check that all subresources in all casses get only the origin portion of the referrer URL.">
+ <!-- No meta: Referrer policy delivered via HTTP headers. -->
+ <link rel="author" title="Kristijan Burnik" href="burnik@chromium.org">
+ <link rel="help" href="https://w3c.github.io/webappsec-referrer-policy/#referrer-policy-origin">
+ <meta name="assert" content="The referrer URL is origin when a
+ document served over http requires an http
+ sub-resource via img-tag using the http-rp
+ delivery method with no-redirect and when
+ the target request is same-origin.">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <!-- TODO(kristijanburnik): Minify and merge both: -->
+ <script src="/referrer-policy/generic/common.js"></script>
+ <script src="/referrer-policy/generic/referrer-policy-test-case.js?pipe=sub"></script>
+ </head>
+ <body>
+ <script>
+ ReferrerPolicyTestCase(
+ {
+ "referrer_policy": "origin",
+ "delivery_method": "http-rp",
+ "redirection": "no-redirect",
+ "origin": "same-origin",
+ "source_protocol": "http",
+ "target_protocol": "http",
+ "subresource": "img-tag",
+ "subresource_path": "/referrer-policy/generic/subresource/image.py",
+ "referrer_url": "origin"
+ },
+ document.querySelector("meta[name=assert]").content,
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/origin/http-rp/same-origin/http-http/img-tag/generic.no-redirect.http.html.headers b/testing/web-platform/tests/referrer-policy/origin/http-rp/same-origin/http-http/img-tag/generic.no-redirect.http.html.headers
new file mode 100644
index 000000000..306a53536
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/origin/http-rp/same-origin/http-http/img-tag/generic.no-redirect.http.html.headers
@@ -0,0 +1,2 @@
+Referrer-Policy: origin
+Access-Control-Allow-Origin: *
diff --git a/testing/web-platform/tests/referrer-policy/origin/http-rp/same-origin/http-http/img-tag/generic.swap-origin-redirect.http.html b/testing/web-platform/tests/referrer-policy/origin/http-rp/same-origin/http-http/img-tag/generic.swap-origin-redirect.http.html
new file mode 100644
index 000000000..4f0872346
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/origin/http-rp/same-origin/http-http/img-tag/generic.swap-origin-redirect.http.html
@@ -0,0 +1,41 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by referrer-policy/generic/tools/generate.py using referrer-policy/generic/template/test.release.html.template. -->
+<html>
+ <head>
+ <title>Referrer-Policy: Referrer Policy is set to 'origin'</title>
+ <meta name="description" content="Check that all subresources in all casses get only the origin portion of the referrer URL.">
+ <!-- No meta: Referrer policy delivered via HTTP headers. -->
+ <link rel="author" title="Kristijan Burnik" href="burnik@chromium.org">
+ <link rel="help" href="https://w3c.github.io/webappsec-referrer-policy/#referrer-policy-origin">
+ <meta name="assert" content="The referrer URL is origin when a
+ document served over http requires an http
+ sub-resource via img-tag using the http-rp
+ delivery method with swap-origin-redirect and when
+ the target request is same-origin.">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <!-- TODO(kristijanburnik): Minify and merge both: -->
+ <script src="/referrer-policy/generic/common.js"></script>
+ <script src="/referrer-policy/generic/referrer-policy-test-case.js?pipe=sub"></script>
+ </head>
+ <body>
+ <script>
+ ReferrerPolicyTestCase(
+ {
+ "referrer_policy": "origin",
+ "delivery_method": "http-rp",
+ "redirection": "swap-origin-redirect",
+ "origin": "same-origin",
+ "source_protocol": "http",
+ "target_protocol": "http",
+ "subresource": "img-tag",
+ "subresource_path": "/referrer-policy/generic/subresource/image.py",
+ "referrer_url": "origin"
+ },
+ document.querySelector("meta[name=assert]").content,
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/origin/http-rp/same-origin/http-http/img-tag/generic.swap-origin-redirect.http.html.headers b/testing/web-platform/tests/referrer-policy/origin/http-rp/same-origin/http-http/img-tag/generic.swap-origin-redirect.http.html.headers
new file mode 100644
index 000000000..306a53536
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/origin/http-rp/same-origin/http-http/img-tag/generic.swap-origin-redirect.http.html.headers
@@ -0,0 +1,2 @@
+Referrer-Policy: origin
+Access-Control-Allow-Origin: *
diff --git a/testing/web-platform/tests/referrer-policy/origin/http-rp/same-origin/http-http/script-tag/generic.keep-origin-redirect.http.html b/testing/web-platform/tests/referrer-policy/origin/http-rp/same-origin/http-http/script-tag/generic.keep-origin-redirect.http.html
new file mode 100644
index 000000000..04027e95f
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/origin/http-rp/same-origin/http-http/script-tag/generic.keep-origin-redirect.http.html
@@ -0,0 +1,41 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by referrer-policy/generic/tools/generate.py using referrer-policy/generic/template/test.release.html.template. -->
+<html>
+ <head>
+ <title>Referrer-Policy: Referrer Policy is set to 'origin'</title>
+ <meta name="description" content="Check that all subresources in all casses get only the origin portion of the referrer URL.">
+ <!-- No meta: Referrer policy delivered via HTTP headers. -->
+ <link rel="author" title="Kristijan Burnik" href="burnik@chromium.org">
+ <link rel="help" href="https://w3c.github.io/webappsec-referrer-policy/#referrer-policy-origin">
+ <meta name="assert" content="The referrer URL is origin when a
+ document served over http requires an http
+ sub-resource via script-tag using the http-rp
+ delivery method with keep-origin-redirect and when
+ the target request is same-origin.">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <!-- TODO(kristijanburnik): Minify and merge both: -->
+ <script src="/referrer-policy/generic/common.js"></script>
+ <script src="/referrer-policy/generic/referrer-policy-test-case.js?pipe=sub"></script>
+ </head>
+ <body>
+ <script>
+ ReferrerPolicyTestCase(
+ {
+ "referrer_policy": "origin",
+ "delivery_method": "http-rp",
+ "redirection": "keep-origin-redirect",
+ "origin": "same-origin",
+ "source_protocol": "http",
+ "target_protocol": "http",
+ "subresource": "script-tag",
+ "subresource_path": "/referrer-policy/generic/subresource/script.py",
+ "referrer_url": "origin"
+ },
+ document.querySelector("meta[name=assert]").content,
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/origin/http-rp/same-origin/http-http/script-tag/generic.keep-origin-redirect.http.html.headers b/testing/web-platform/tests/referrer-policy/origin/http-rp/same-origin/http-http/script-tag/generic.keep-origin-redirect.http.html.headers
new file mode 100644
index 000000000..306a53536
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/origin/http-rp/same-origin/http-http/script-tag/generic.keep-origin-redirect.http.html.headers
@@ -0,0 +1,2 @@
+Referrer-Policy: origin
+Access-Control-Allow-Origin: *
diff --git a/testing/web-platform/tests/referrer-policy/origin/http-rp/same-origin/http-http/script-tag/generic.no-redirect.http.html b/testing/web-platform/tests/referrer-policy/origin/http-rp/same-origin/http-http/script-tag/generic.no-redirect.http.html
new file mode 100644
index 000000000..37037229b
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/origin/http-rp/same-origin/http-http/script-tag/generic.no-redirect.http.html
@@ -0,0 +1,41 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by referrer-policy/generic/tools/generate.py using referrer-policy/generic/template/test.release.html.template. -->
+<html>
+ <head>
+ <title>Referrer-Policy: Referrer Policy is set to 'origin'</title>
+ <meta name="description" content="Check that all subresources in all casses get only the origin portion of the referrer URL.">
+ <!-- No meta: Referrer policy delivered via HTTP headers. -->
+ <link rel="author" title="Kristijan Burnik" href="burnik@chromium.org">
+ <link rel="help" href="https://w3c.github.io/webappsec-referrer-policy/#referrer-policy-origin">
+ <meta name="assert" content="The referrer URL is origin when a
+ document served over http requires an http
+ sub-resource via script-tag using the http-rp
+ delivery method with no-redirect and when
+ the target request is same-origin.">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <!-- TODO(kristijanburnik): Minify and merge both: -->
+ <script src="/referrer-policy/generic/common.js"></script>
+ <script src="/referrer-policy/generic/referrer-policy-test-case.js?pipe=sub"></script>
+ </head>
+ <body>
+ <script>
+ ReferrerPolicyTestCase(
+ {
+ "referrer_policy": "origin",
+ "delivery_method": "http-rp",
+ "redirection": "no-redirect",
+ "origin": "same-origin",
+ "source_protocol": "http",
+ "target_protocol": "http",
+ "subresource": "script-tag",
+ "subresource_path": "/referrer-policy/generic/subresource/script.py",
+ "referrer_url": "origin"
+ },
+ document.querySelector("meta[name=assert]").content,
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/origin/http-rp/same-origin/http-http/script-tag/generic.no-redirect.http.html.headers b/testing/web-platform/tests/referrer-policy/origin/http-rp/same-origin/http-http/script-tag/generic.no-redirect.http.html.headers
new file mode 100644
index 000000000..306a53536
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/origin/http-rp/same-origin/http-http/script-tag/generic.no-redirect.http.html.headers
@@ -0,0 +1,2 @@
+Referrer-Policy: origin
+Access-Control-Allow-Origin: *
diff --git a/testing/web-platform/tests/referrer-policy/origin/http-rp/same-origin/http-http/script-tag/generic.swap-origin-redirect.http.html b/testing/web-platform/tests/referrer-policy/origin/http-rp/same-origin/http-http/script-tag/generic.swap-origin-redirect.http.html
new file mode 100644
index 000000000..13473d515
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/origin/http-rp/same-origin/http-http/script-tag/generic.swap-origin-redirect.http.html
@@ -0,0 +1,41 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by referrer-policy/generic/tools/generate.py using referrer-policy/generic/template/test.release.html.template. -->
+<html>
+ <head>
+ <title>Referrer-Policy: Referrer Policy is set to 'origin'</title>
+ <meta name="description" content="Check that all subresources in all casses get only the origin portion of the referrer URL.">
+ <!-- No meta: Referrer policy delivered via HTTP headers. -->
+ <link rel="author" title="Kristijan Burnik" href="burnik@chromium.org">
+ <link rel="help" href="https://w3c.github.io/webappsec-referrer-policy/#referrer-policy-origin">
+ <meta name="assert" content="The referrer URL is origin when a
+ document served over http requires an http
+ sub-resource via script-tag using the http-rp
+ delivery method with swap-origin-redirect and when
+ the target request is same-origin.">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <!-- TODO(kristijanburnik): Minify and merge both: -->
+ <script src="/referrer-policy/generic/common.js"></script>
+ <script src="/referrer-policy/generic/referrer-policy-test-case.js?pipe=sub"></script>
+ </head>
+ <body>
+ <script>
+ ReferrerPolicyTestCase(
+ {
+ "referrer_policy": "origin",
+ "delivery_method": "http-rp",
+ "redirection": "swap-origin-redirect",
+ "origin": "same-origin",
+ "source_protocol": "http",
+ "target_protocol": "http",
+ "subresource": "script-tag",
+ "subresource_path": "/referrer-policy/generic/subresource/script.py",
+ "referrer_url": "origin"
+ },
+ document.querySelector("meta[name=assert]").content,
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/origin/http-rp/same-origin/http-http/script-tag/generic.swap-origin-redirect.http.html.headers b/testing/web-platform/tests/referrer-policy/origin/http-rp/same-origin/http-http/script-tag/generic.swap-origin-redirect.http.html.headers
new file mode 100644
index 000000000..306a53536
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/origin/http-rp/same-origin/http-http/script-tag/generic.swap-origin-redirect.http.html.headers
@@ -0,0 +1,2 @@
+Referrer-Policy: origin
+Access-Control-Allow-Origin: *
diff --git a/testing/web-platform/tests/referrer-policy/origin/http-rp/same-origin/http-http/xhr-request/generic.keep-origin-redirect.http.html b/testing/web-platform/tests/referrer-policy/origin/http-rp/same-origin/http-http/xhr-request/generic.keep-origin-redirect.http.html
new file mode 100644
index 000000000..619ed34a3
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/origin/http-rp/same-origin/http-http/xhr-request/generic.keep-origin-redirect.http.html
@@ -0,0 +1,41 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by referrer-policy/generic/tools/generate.py using referrer-policy/generic/template/test.release.html.template. -->
+<html>
+ <head>
+ <title>Referrer-Policy: Referrer Policy is set to 'origin'</title>
+ <meta name="description" content="Check that all subresources in all casses get only the origin portion of the referrer URL.">
+ <!-- No meta: Referrer policy delivered via HTTP headers. -->
+ <link rel="author" title="Kristijan Burnik" href="burnik@chromium.org">
+ <link rel="help" href="https://w3c.github.io/webappsec-referrer-policy/#referrer-policy-origin">
+ <meta name="assert" content="The referrer URL is origin when a
+ document served over http requires an http
+ sub-resource via xhr-request using the http-rp
+ delivery method with keep-origin-redirect and when
+ the target request is same-origin.">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <!-- TODO(kristijanburnik): Minify and merge both: -->
+ <script src="/referrer-policy/generic/common.js"></script>
+ <script src="/referrer-policy/generic/referrer-policy-test-case.js?pipe=sub"></script>
+ </head>
+ <body>
+ <script>
+ ReferrerPolicyTestCase(
+ {
+ "referrer_policy": "origin",
+ "delivery_method": "http-rp",
+ "redirection": "keep-origin-redirect",
+ "origin": "same-origin",
+ "source_protocol": "http",
+ "target_protocol": "http",
+ "subresource": "xhr-request",
+ "subresource_path": "/referrer-policy/generic/subresource/xhr.py",
+ "referrer_url": "origin"
+ },
+ document.querySelector("meta[name=assert]").content,
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/origin/http-rp/same-origin/http-http/xhr-request/generic.keep-origin-redirect.http.html.headers b/testing/web-platform/tests/referrer-policy/origin/http-rp/same-origin/http-http/xhr-request/generic.keep-origin-redirect.http.html.headers
new file mode 100644
index 000000000..306a53536
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/origin/http-rp/same-origin/http-http/xhr-request/generic.keep-origin-redirect.http.html.headers
@@ -0,0 +1,2 @@
+Referrer-Policy: origin
+Access-Control-Allow-Origin: *
diff --git a/testing/web-platform/tests/referrer-policy/origin/http-rp/same-origin/http-http/xhr-request/generic.no-redirect.http.html b/testing/web-platform/tests/referrer-policy/origin/http-rp/same-origin/http-http/xhr-request/generic.no-redirect.http.html
new file mode 100644
index 000000000..015a044da
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/origin/http-rp/same-origin/http-http/xhr-request/generic.no-redirect.http.html
@@ -0,0 +1,41 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by referrer-policy/generic/tools/generate.py using referrer-policy/generic/template/test.release.html.template. -->
+<html>
+ <head>
+ <title>Referrer-Policy: Referrer Policy is set to 'origin'</title>
+ <meta name="description" content="Check that all subresources in all casses get only the origin portion of the referrer URL.">
+ <!-- No meta: Referrer policy delivered via HTTP headers. -->
+ <link rel="author" title="Kristijan Burnik" href="burnik@chromium.org">
+ <link rel="help" href="https://w3c.github.io/webappsec-referrer-policy/#referrer-policy-origin">
+ <meta name="assert" content="The referrer URL is origin when a
+ document served over http requires an http
+ sub-resource via xhr-request using the http-rp
+ delivery method with no-redirect and when
+ the target request is same-origin.">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <!-- TODO(kristijanburnik): Minify and merge both: -->
+ <script src="/referrer-policy/generic/common.js"></script>
+ <script src="/referrer-policy/generic/referrer-policy-test-case.js?pipe=sub"></script>
+ </head>
+ <body>
+ <script>
+ ReferrerPolicyTestCase(
+ {
+ "referrer_policy": "origin",
+ "delivery_method": "http-rp",
+ "redirection": "no-redirect",
+ "origin": "same-origin",
+ "source_protocol": "http",
+ "target_protocol": "http",
+ "subresource": "xhr-request",
+ "subresource_path": "/referrer-policy/generic/subresource/xhr.py",
+ "referrer_url": "origin"
+ },
+ document.querySelector("meta[name=assert]").content,
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/origin/http-rp/same-origin/http-http/xhr-request/generic.no-redirect.http.html.headers b/testing/web-platform/tests/referrer-policy/origin/http-rp/same-origin/http-http/xhr-request/generic.no-redirect.http.html.headers
new file mode 100644
index 000000000..306a53536
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/origin/http-rp/same-origin/http-http/xhr-request/generic.no-redirect.http.html.headers
@@ -0,0 +1,2 @@
+Referrer-Policy: origin
+Access-Control-Allow-Origin: *
diff --git a/testing/web-platform/tests/referrer-policy/origin/http-rp/same-origin/http-http/xhr-request/generic.swap-origin-redirect.http.html b/testing/web-platform/tests/referrer-policy/origin/http-rp/same-origin/http-http/xhr-request/generic.swap-origin-redirect.http.html
new file mode 100644
index 000000000..2b3c2527b
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/origin/http-rp/same-origin/http-http/xhr-request/generic.swap-origin-redirect.http.html
@@ -0,0 +1,41 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by referrer-policy/generic/tools/generate.py using referrer-policy/generic/template/test.release.html.template. -->
+<html>
+ <head>
+ <title>Referrer-Policy: Referrer Policy is set to 'origin'</title>
+ <meta name="description" content="Check that all subresources in all casses get only the origin portion of the referrer URL.">
+ <!-- No meta: Referrer policy delivered via HTTP headers. -->
+ <link rel="author" title="Kristijan Burnik" href="burnik@chromium.org">
+ <link rel="help" href="https://w3c.github.io/webappsec-referrer-policy/#referrer-policy-origin">
+ <meta name="assert" content="The referrer URL is origin when a
+ document served over http requires an http
+ sub-resource via xhr-request using the http-rp
+ delivery method with swap-origin-redirect and when
+ the target request is same-origin.">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <!-- TODO(kristijanburnik): Minify and merge both: -->
+ <script src="/referrer-policy/generic/common.js"></script>
+ <script src="/referrer-policy/generic/referrer-policy-test-case.js?pipe=sub"></script>
+ </head>
+ <body>
+ <script>
+ ReferrerPolicyTestCase(
+ {
+ "referrer_policy": "origin",
+ "delivery_method": "http-rp",
+ "redirection": "swap-origin-redirect",
+ "origin": "same-origin",
+ "source_protocol": "http",
+ "target_protocol": "http",
+ "subresource": "xhr-request",
+ "subresource_path": "/referrer-policy/generic/subresource/xhr.py",
+ "referrer_url": "origin"
+ },
+ document.querySelector("meta[name=assert]").content,
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/origin/http-rp/same-origin/http-http/xhr-request/generic.swap-origin-redirect.http.html.headers b/testing/web-platform/tests/referrer-policy/origin/http-rp/same-origin/http-http/xhr-request/generic.swap-origin-redirect.http.html.headers
new file mode 100644
index 000000000..306a53536
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/origin/http-rp/same-origin/http-http/xhr-request/generic.swap-origin-redirect.http.html.headers
@@ -0,0 +1,2 @@
+Referrer-Policy: origin
+Access-Control-Allow-Origin: *
diff --git a/testing/web-platform/tests/referrer-policy/origin/http-rp/same-origin/http-https/fetch-request/generic.keep-origin-redirect.http.html b/testing/web-platform/tests/referrer-policy/origin/http-rp/same-origin/http-https/fetch-request/generic.keep-origin-redirect.http.html
new file mode 100644
index 000000000..02d91a903
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/origin/http-rp/same-origin/http-https/fetch-request/generic.keep-origin-redirect.http.html
@@ -0,0 +1,41 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by referrer-policy/generic/tools/generate.py using referrer-policy/generic/template/test.release.html.template. -->
+<html>
+ <head>
+ <title>Referrer-Policy: Referrer Policy is set to 'origin'</title>
+ <meta name="description" content="Check that all subresources in all casses get only the origin portion of the referrer URL.">
+ <!-- No meta: Referrer policy delivered via HTTP headers. -->
+ <link rel="author" title="Kristijan Burnik" href="burnik@chromium.org">
+ <link rel="help" href="https://w3c.github.io/webappsec-referrer-policy/#referrer-policy-origin">
+ <meta name="assert" content="The referrer URL is origin when a
+ document served over http requires an https
+ sub-resource via fetch-request using the http-rp
+ delivery method with keep-origin-redirect and when
+ the target request is same-origin.">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <!-- TODO(kristijanburnik): Minify and merge both: -->
+ <script src="/referrer-policy/generic/common.js"></script>
+ <script src="/referrer-policy/generic/referrer-policy-test-case.js?pipe=sub"></script>
+ </head>
+ <body>
+ <script>
+ ReferrerPolicyTestCase(
+ {
+ "referrer_policy": "origin",
+ "delivery_method": "http-rp",
+ "redirection": "keep-origin-redirect",
+ "origin": "same-origin",
+ "source_protocol": "http",
+ "target_protocol": "https",
+ "subresource": "fetch-request",
+ "subresource_path": "/referrer-policy/generic/subresource/xhr.py",
+ "referrer_url": "origin"
+ },
+ document.querySelector("meta[name=assert]").content,
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/origin/http-rp/same-origin/http-https/fetch-request/generic.keep-origin-redirect.http.html.headers b/testing/web-platform/tests/referrer-policy/origin/http-rp/same-origin/http-https/fetch-request/generic.keep-origin-redirect.http.html.headers
new file mode 100644
index 000000000..306a53536
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/origin/http-rp/same-origin/http-https/fetch-request/generic.keep-origin-redirect.http.html.headers
@@ -0,0 +1,2 @@
+Referrer-Policy: origin
+Access-Control-Allow-Origin: *
diff --git a/testing/web-platform/tests/referrer-policy/origin/http-rp/same-origin/http-https/fetch-request/generic.no-redirect.http.html b/testing/web-platform/tests/referrer-policy/origin/http-rp/same-origin/http-https/fetch-request/generic.no-redirect.http.html
new file mode 100644
index 000000000..064eea5a3
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/origin/http-rp/same-origin/http-https/fetch-request/generic.no-redirect.http.html
@@ -0,0 +1,41 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by referrer-policy/generic/tools/generate.py using referrer-policy/generic/template/test.release.html.template. -->
+<html>
+ <head>
+ <title>Referrer-Policy: Referrer Policy is set to 'origin'</title>
+ <meta name="description" content="Check that all subresources in all casses get only the origin portion of the referrer URL.">
+ <!-- No meta: Referrer policy delivered via HTTP headers. -->
+ <link rel="author" title="Kristijan Burnik" href="burnik@chromium.org">
+ <link rel="help" href="https://w3c.github.io/webappsec-referrer-policy/#referrer-policy-origin">
+ <meta name="assert" content="The referrer URL is origin when a
+ document served over http requires an https
+ sub-resource via fetch-request using the http-rp
+ delivery method with no-redirect and when
+ the target request is same-origin.">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <!-- TODO(kristijanburnik): Minify and merge both: -->
+ <script src="/referrer-policy/generic/common.js"></script>
+ <script src="/referrer-policy/generic/referrer-policy-test-case.js?pipe=sub"></script>
+ </head>
+ <body>
+ <script>
+ ReferrerPolicyTestCase(
+ {
+ "referrer_policy": "origin",
+ "delivery_method": "http-rp",
+ "redirection": "no-redirect",
+ "origin": "same-origin",
+ "source_protocol": "http",
+ "target_protocol": "https",
+ "subresource": "fetch-request",
+ "subresource_path": "/referrer-policy/generic/subresource/xhr.py",
+ "referrer_url": "origin"
+ },
+ document.querySelector("meta[name=assert]").content,
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/origin/http-rp/same-origin/http-https/fetch-request/generic.no-redirect.http.html.headers b/testing/web-platform/tests/referrer-policy/origin/http-rp/same-origin/http-https/fetch-request/generic.no-redirect.http.html.headers
new file mode 100644
index 000000000..306a53536
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/origin/http-rp/same-origin/http-https/fetch-request/generic.no-redirect.http.html.headers
@@ -0,0 +1,2 @@
+Referrer-Policy: origin
+Access-Control-Allow-Origin: *
diff --git a/testing/web-platform/tests/referrer-policy/origin/http-rp/same-origin/http-https/fetch-request/generic.swap-origin-redirect.http.html b/testing/web-platform/tests/referrer-policy/origin/http-rp/same-origin/http-https/fetch-request/generic.swap-origin-redirect.http.html
new file mode 100644
index 000000000..d92098a31
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/origin/http-rp/same-origin/http-https/fetch-request/generic.swap-origin-redirect.http.html
@@ -0,0 +1,41 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by referrer-policy/generic/tools/generate.py using referrer-policy/generic/template/test.release.html.template. -->
+<html>
+ <head>
+ <title>Referrer-Policy: Referrer Policy is set to 'origin'</title>
+ <meta name="description" content="Check that all subresources in all casses get only the origin portion of the referrer URL.">
+ <!-- No meta: Referrer policy delivered via HTTP headers. -->
+ <link rel="author" title="Kristijan Burnik" href="burnik@chromium.org">
+ <link rel="help" href="https://w3c.github.io/webappsec-referrer-policy/#referrer-policy-origin">
+ <meta name="assert" content="The referrer URL is origin when a
+ document served over http requires an https
+ sub-resource via fetch-request using the http-rp
+ delivery method with swap-origin-redirect and when
+ the target request is same-origin.">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <!-- TODO(kristijanburnik): Minify and merge both: -->
+ <script src="/referrer-policy/generic/common.js"></script>
+ <script src="/referrer-policy/generic/referrer-policy-test-case.js?pipe=sub"></script>
+ </head>
+ <body>
+ <script>
+ ReferrerPolicyTestCase(
+ {
+ "referrer_policy": "origin",
+ "delivery_method": "http-rp",
+ "redirection": "swap-origin-redirect",
+ "origin": "same-origin",
+ "source_protocol": "http",
+ "target_protocol": "https",
+ "subresource": "fetch-request",
+ "subresource_path": "/referrer-policy/generic/subresource/xhr.py",
+ "referrer_url": "origin"
+ },
+ document.querySelector("meta[name=assert]").content,
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/origin/http-rp/same-origin/http-https/fetch-request/generic.swap-origin-redirect.http.html.headers b/testing/web-platform/tests/referrer-policy/origin/http-rp/same-origin/http-https/fetch-request/generic.swap-origin-redirect.http.html.headers
new file mode 100644
index 000000000..306a53536
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/origin/http-rp/same-origin/http-https/fetch-request/generic.swap-origin-redirect.http.html.headers
@@ -0,0 +1,2 @@
+Referrer-Policy: origin
+Access-Control-Allow-Origin: *
diff --git a/testing/web-platform/tests/referrer-policy/origin/http-rp/same-origin/http-https/iframe-tag/generic.keep-origin-redirect.http.html b/testing/web-platform/tests/referrer-policy/origin/http-rp/same-origin/http-https/iframe-tag/generic.keep-origin-redirect.http.html
new file mode 100644
index 000000000..a8f6d4c2b
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/origin/http-rp/same-origin/http-https/iframe-tag/generic.keep-origin-redirect.http.html
@@ -0,0 +1,41 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by referrer-policy/generic/tools/generate.py using referrer-policy/generic/template/test.release.html.template. -->
+<html>
+ <head>
+ <title>Referrer-Policy: Referrer Policy is set to 'origin'</title>
+ <meta name="description" content="Check that all subresources in all casses get only the origin portion of the referrer URL.">
+ <!-- No meta: Referrer policy delivered via HTTP headers. -->
+ <link rel="author" title="Kristijan Burnik" href="burnik@chromium.org">
+ <link rel="help" href="https://w3c.github.io/webappsec-referrer-policy/#referrer-policy-origin">
+ <meta name="assert" content="The referrer URL is origin when a
+ document served over http requires an https
+ sub-resource via iframe-tag using the http-rp
+ delivery method with keep-origin-redirect and when
+ the target request is same-origin.">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <!-- TODO(kristijanburnik): Minify and merge both: -->
+ <script src="/referrer-policy/generic/common.js"></script>
+ <script src="/referrer-policy/generic/referrer-policy-test-case.js?pipe=sub"></script>
+ </head>
+ <body>
+ <script>
+ ReferrerPolicyTestCase(
+ {
+ "referrer_policy": "origin",
+ "delivery_method": "http-rp",
+ "redirection": "keep-origin-redirect",
+ "origin": "same-origin",
+ "source_protocol": "http",
+ "target_protocol": "https",
+ "subresource": "iframe-tag",
+ "subresource_path": "/referrer-policy/generic/subresource/document.py",
+ "referrer_url": "origin"
+ },
+ document.querySelector("meta[name=assert]").content,
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/origin/http-rp/same-origin/http-https/iframe-tag/generic.keep-origin-redirect.http.html.headers b/testing/web-platform/tests/referrer-policy/origin/http-rp/same-origin/http-https/iframe-tag/generic.keep-origin-redirect.http.html.headers
new file mode 100644
index 000000000..306a53536
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/origin/http-rp/same-origin/http-https/iframe-tag/generic.keep-origin-redirect.http.html.headers
@@ -0,0 +1,2 @@
+Referrer-Policy: origin
+Access-Control-Allow-Origin: *
diff --git a/testing/web-platform/tests/referrer-policy/origin/http-rp/same-origin/http-https/iframe-tag/generic.no-redirect.http.html b/testing/web-platform/tests/referrer-policy/origin/http-rp/same-origin/http-https/iframe-tag/generic.no-redirect.http.html
new file mode 100644
index 000000000..22b20d3b1
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/origin/http-rp/same-origin/http-https/iframe-tag/generic.no-redirect.http.html
@@ -0,0 +1,41 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by referrer-policy/generic/tools/generate.py using referrer-policy/generic/template/test.release.html.template. -->
+<html>
+ <head>
+ <title>Referrer-Policy: Referrer Policy is set to 'origin'</title>
+ <meta name="description" content="Check that all subresources in all casses get only the origin portion of the referrer URL.">
+ <!-- No meta: Referrer policy delivered via HTTP headers. -->
+ <link rel="author" title="Kristijan Burnik" href="burnik@chromium.org">
+ <link rel="help" href="https://w3c.github.io/webappsec-referrer-policy/#referrer-policy-origin">
+ <meta name="assert" content="The referrer URL is origin when a
+ document served over http requires an https
+ sub-resource via iframe-tag using the http-rp
+ delivery method with no-redirect and when
+ the target request is same-origin.">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <!-- TODO(kristijanburnik): Minify and merge both: -->
+ <script src="/referrer-policy/generic/common.js"></script>
+ <script src="/referrer-policy/generic/referrer-policy-test-case.js?pipe=sub"></script>
+ </head>
+ <body>
+ <script>
+ ReferrerPolicyTestCase(
+ {
+ "referrer_policy": "origin",
+ "delivery_method": "http-rp",
+ "redirection": "no-redirect",
+ "origin": "same-origin",
+ "source_protocol": "http",
+ "target_protocol": "https",
+ "subresource": "iframe-tag",
+ "subresource_path": "/referrer-policy/generic/subresource/document.py",
+ "referrer_url": "origin"
+ },
+ document.querySelector("meta[name=assert]").content,
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/origin/http-rp/same-origin/http-https/iframe-tag/generic.no-redirect.http.html.headers b/testing/web-platform/tests/referrer-policy/origin/http-rp/same-origin/http-https/iframe-tag/generic.no-redirect.http.html.headers
new file mode 100644
index 000000000..306a53536
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/origin/http-rp/same-origin/http-https/iframe-tag/generic.no-redirect.http.html.headers
@@ -0,0 +1,2 @@
+Referrer-Policy: origin
+Access-Control-Allow-Origin: *
diff --git a/testing/web-platform/tests/referrer-policy/origin/http-rp/same-origin/http-https/iframe-tag/generic.swap-origin-redirect.http.html b/testing/web-platform/tests/referrer-policy/origin/http-rp/same-origin/http-https/iframe-tag/generic.swap-origin-redirect.http.html
new file mode 100644
index 000000000..e4c0e8e69
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/origin/http-rp/same-origin/http-https/iframe-tag/generic.swap-origin-redirect.http.html
@@ -0,0 +1,41 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by referrer-policy/generic/tools/generate.py using referrer-policy/generic/template/test.release.html.template. -->
+<html>
+ <head>
+ <title>Referrer-Policy: Referrer Policy is set to 'origin'</title>
+ <meta name="description" content="Check that all subresources in all casses get only the origin portion of the referrer URL.">
+ <!-- No meta: Referrer policy delivered via HTTP headers. -->
+ <link rel="author" title="Kristijan Burnik" href="burnik@chromium.org">
+ <link rel="help" href="https://w3c.github.io/webappsec-referrer-policy/#referrer-policy-origin">
+ <meta name="assert" content="The referrer URL is origin when a
+ document served over http requires an https
+ sub-resource via iframe-tag using the http-rp
+ delivery method with swap-origin-redirect and when
+ the target request is same-origin.">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <!-- TODO(kristijanburnik): Minify and merge both: -->
+ <script src="/referrer-policy/generic/common.js"></script>
+ <script src="/referrer-policy/generic/referrer-policy-test-case.js?pipe=sub"></script>
+ </head>
+ <body>
+ <script>
+ ReferrerPolicyTestCase(
+ {
+ "referrer_policy": "origin",
+ "delivery_method": "http-rp",
+ "redirection": "swap-origin-redirect",
+ "origin": "same-origin",
+ "source_protocol": "http",
+ "target_protocol": "https",
+ "subresource": "iframe-tag",
+ "subresource_path": "/referrer-policy/generic/subresource/document.py",
+ "referrer_url": "origin"
+ },
+ document.querySelector("meta[name=assert]").content,
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/origin/http-rp/same-origin/http-https/iframe-tag/generic.swap-origin-redirect.http.html.headers b/testing/web-platform/tests/referrer-policy/origin/http-rp/same-origin/http-https/iframe-tag/generic.swap-origin-redirect.http.html.headers
new file mode 100644
index 000000000..306a53536
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/origin/http-rp/same-origin/http-https/iframe-tag/generic.swap-origin-redirect.http.html.headers
@@ -0,0 +1,2 @@
+Referrer-Policy: origin
+Access-Control-Allow-Origin: *
diff --git a/testing/web-platform/tests/referrer-policy/origin/http-rp/same-origin/http-https/img-tag/generic.keep-origin-redirect.http.html b/testing/web-platform/tests/referrer-policy/origin/http-rp/same-origin/http-https/img-tag/generic.keep-origin-redirect.http.html
new file mode 100644
index 000000000..30a7422fe
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/origin/http-rp/same-origin/http-https/img-tag/generic.keep-origin-redirect.http.html
@@ -0,0 +1,41 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by referrer-policy/generic/tools/generate.py using referrer-policy/generic/template/test.release.html.template. -->
+<html>
+ <head>
+ <title>Referrer-Policy: Referrer Policy is set to 'origin'</title>
+ <meta name="description" content="Check that all subresources in all casses get only the origin portion of the referrer URL.">
+ <!-- No meta: Referrer policy delivered via HTTP headers. -->
+ <link rel="author" title="Kristijan Burnik" href="burnik@chromium.org">
+ <link rel="help" href="https://w3c.github.io/webappsec-referrer-policy/#referrer-policy-origin">
+ <meta name="assert" content="The referrer URL is origin when a
+ document served over http requires an https
+ sub-resource via img-tag using the http-rp
+ delivery method with keep-origin-redirect and when
+ the target request is same-origin.">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <!-- TODO(kristijanburnik): Minify and merge both: -->
+ <script src="/referrer-policy/generic/common.js"></script>
+ <script src="/referrer-policy/generic/referrer-policy-test-case.js?pipe=sub"></script>
+ </head>
+ <body>
+ <script>
+ ReferrerPolicyTestCase(
+ {
+ "referrer_policy": "origin",
+ "delivery_method": "http-rp",
+ "redirection": "keep-origin-redirect",
+ "origin": "same-origin",
+ "source_protocol": "http",
+ "target_protocol": "https",
+ "subresource": "img-tag",
+ "subresource_path": "/referrer-policy/generic/subresource/image.py",
+ "referrer_url": "origin"
+ },
+ document.querySelector("meta[name=assert]").content,
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/origin/http-rp/same-origin/http-https/img-tag/generic.keep-origin-redirect.http.html.headers b/testing/web-platform/tests/referrer-policy/origin/http-rp/same-origin/http-https/img-tag/generic.keep-origin-redirect.http.html.headers
new file mode 100644
index 000000000..306a53536
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/origin/http-rp/same-origin/http-https/img-tag/generic.keep-origin-redirect.http.html.headers
@@ -0,0 +1,2 @@
+Referrer-Policy: origin
+Access-Control-Allow-Origin: *
diff --git a/testing/web-platform/tests/referrer-policy/origin/http-rp/same-origin/http-https/img-tag/generic.no-redirect.http.html b/testing/web-platform/tests/referrer-policy/origin/http-rp/same-origin/http-https/img-tag/generic.no-redirect.http.html
new file mode 100644
index 000000000..99c436d7f
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/origin/http-rp/same-origin/http-https/img-tag/generic.no-redirect.http.html
@@ -0,0 +1,41 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by referrer-policy/generic/tools/generate.py using referrer-policy/generic/template/test.release.html.template. -->
+<html>
+ <head>
+ <title>Referrer-Policy: Referrer Policy is set to 'origin'</title>
+ <meta name="description" content="Check that all subresources in all casses get only the origin portion of the referrer URL.">
+ <!-- No meta: Referrer policy delivered via HTTP headers. -->
+ <link rel="author" title="Kristijan Burnik" href="burnik@chromium.org">
+ <link rel="help" href="https://w3c.github.io/webappsec-referrer-policy/#referrer-policy-origin">
+ <meta name="assert" content="The referrer URL is origin when a
+ document served over http requires an https
+ sub-resource via img-tag using the http-rp
+ delivery method with no-redirect and when
+ the target request is same-origin.">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <!-- TODO(kristijanburnik): Minify and merge both: -->
+ <script src="/referrer-policy/generic/common.js"></script>
+ <script src="/referrer-policy/generic/referrer-policy-test-case.js?pipe=sub"></script>
+ </head>
+ <body>
+ <script>
+ ReferrerPolicyTestCase(
+ {
+ "referrer_policy": "origin",
+ "delivery_method": "http-rp",
+ "redirection": "no-redirect",
+ "origin": "same-origin",
+ "source_protocol": "http",
+ "target_protocol": "https",
+ "subresource": "img-tag",
+ "subresource_path": "/referrer-policy/generic/subresource/image.py",
+ "referrer_url": "origin"
+ },
+ document.querySelector("meta[name=assert]").content,
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/origin/http-rp/same-origin/http-https/img-tag/generic.no-redirect.http.html.headers b/testing/web-platform/tests/referrer-policy/origin/http-rp/same-origin/http-https/img-tag/generic.no-redirect.http.html.headers
new file mode 100644
index 000000000..306a53536
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/origin/http-rp/same-origin/http-https/img-tag/generic.no-redirect.http.html.headers
@@ -0,0 +1,2 @@
+Referrer-Policy: origin
+Access-Control-Allow-Origin: *
diff --git a/testing/web-platform/tests/referrer-policy/origin/http-rp/same-origin/http-https/img-tag/generic.swap-origin-redirect.http.html b/testing/web-platform/tests/referrer-policy/origin/http-rp/same-origin/http-https/img-tag/generic.swap-origin-redirect.http.html
new file mode 100644
index 000000000..a94ce6d57
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/origin/http-rp/same-origin/http-https/img-tag/generic.swap-origin-redirect.http.html
@@ -0,0 +1,41 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by referrer-policy/generic/tools/generate.py using referrer-policy/generic/template/test.release.html.template. -->
+<html>
+ <head>
+ <title>Referrer-Policy: Referrer Policy is set to 'origin'</title>
+ <meta name="description" content="Check that all subresources in all casses get only the origin portion of the referrer URL.">
+ <!-- No meta: Referrer policy delivered via HTTP headers. -->
+ <link rel="author" title="Kristijan Burnik" href="burnik@chromium.org">
+ <link rel="help" href="https://w3c.github.io/webappsec-referrer-policy/#referrer-policy-origin">
+ <meta name="assert" content="The referrer URL is origin when a
+ document served over http requires an https
+ sub-resource via img-tag using the http-rp
+ delivery method with swap-origin-redirect and when
+ the target request is same-origin.">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <!-- TODO(kristijanburnik): Minify and merge both: -->
+ <script src="/referrer-policy/generic/common.js"></script>
+ <script src="/referrer-policy/generic/referrer-policy-test-case.js?pipe=sub"></script>
+ </head>
+ <body>
+ <script>
+ ReferrerPolicyTestCase(
+ {
+ "referrer_policy": "origin",
+ "delivery_method": "http-rp",
+ "redirection": "swap-origin-redirect",
+ "origin": "same-origin",
+ "source_protocol": "http",
+ "target_protocol": "https",
+ "subresource": "img-tag",
+ "subresource_path": "/referrer-policy/generic/subresource/image.py",
+ "referrer_url": "origin"
+ },
+ document.querySelector("meta[name=assert]").content,
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/origin/http-rp/same-origin/http-https/img-tag/generic.swap-origin-redirect.http.html.headers b/testing/web-platform/tests/referrer-policy/origin/http-rp/same-origin/http-https/img-tag/generic.swap-origin-redirect.http.html.headers
new file mode 100644
index 000000000..306a53536
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/origin/http-rp/same-origin/http-https/img-tag/generic.swap-origin-redirect.http.html.headers
@@ -0,0 +1,2 @@
+Referrer-Policy: origin
+Access-Control-Allow-Origin: *
diff --git a/testing/web-platform/tests/referrer-policy/origin/http-rp/same-origin/http-https/script-tag/generic.keep-origin-redirect.http.html b/testing/web-platform/tests/referrer-policy/origin/http-rp/same-origin/http-https/script-tag/generic.keep-origin-redirect.http.html
new file mode 100644
index 000000000..9f262c082
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/origin/http-rp/same-origin/http-https/script-tag/generic.keep-origin-redirect.http.html
@@ -0,0 +1,41 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by referrer-policy/generic/tools/generate.py using referrer-policy/generic/template/test.release.html.template. -->
+<html>
+ <head>
+ <title>Referrer-Policy: Referrer Policy is set to 'origin'</title>
+ <meta name="description" content="Check that all subresources in all casses get only the origin portion of the referrer URL.">
+ <!-- No meta: Referrer policy delivered via HTTP headers. -->
+ <link rel="author" title="Kristijan Burnik" href="burnik@chromium.org">
+ <link rel="help" href="https://w3c.github.io/webappsec-referrer-policy/#referrer-policy-origin">
+ <meta name="assert" content="The referrer URL is origin when a
+ document served over http requires an https
+ sub-resource via script-tag using the http-rp
+ delivery method with keep-origin-redirect and when
+ the target request is same-origin.">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <!-- TODO(kristijanburnik): Minify and merge both: -->
+ <script src="/referrer-policy/generic/common.js"></script>
+ <script src="/referrer-policy/generic/referrer-policy-test-case.js?pipe=sub"></script>
+ </head>
+ <body>
+ <script>
+ ReferrerPolicyTestCase(
+ {
+ "referrer_policy": "origin",
+ "delivery_method": "http-rp",
+ "redirection": "keep-origin-redirect",
+ "origin": "same-origin",
+ "source_protocol": "http",
+ "target_protocol": "https",
+ "subresource": "script-tag",
+ "subresource_path": "/referrer-policy/generic/subresource/script.py",
+ "referrer_url": "origin"
+ },
+ document.querySelector("meta[name=assert]").content,
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/origin/http-rp/same-origin/http-https/script-tag/generic.keep-origin-redirect.http.html.headers b/testing/web-platform/tests/referrer-policy/origin/http-rp/same-origin/http-https/script-tag/generic.keep-origin-redirect.http.html.headers
new file mode 100644
index 000000000..306a53536
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/origin/http-rp/same-origin/http-https/script-tag/generic.keep-origin-redirect.http.html.headers
@@ -0,0 +1,2 @@
+Referrer-Policy: origin
+Access-Control-Allow-Origin: *
diff --git a/testing/web-platform/tests/referrer-policy/origin/http-rp/same-origin/http-https/script-tag/generic.no-redirect.http.html b/testing/web-platform/tests/referrer-policy/origin/http-rp/same-origin/http-https/script-tag/generic.no-redirect.http.html
new file mode 100644
index 000000000..e4d50953a
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/origin/http-rp/same-origin/http-https/script-tag/generic.no-redirect.http.html
@@ -0,0 +1,41 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by referrer-policy/generic/tools/generate.py using referrer-policy/generic/template/test.release.html.template. -->
+<html>
+ <head>
+ <title>Referrer-Policy: Referrer Policy is set to 'origin'</title>
+ <meta name="description" content="Check that all subresources in all casses get only the origin portion of the referrer URL.">
+ <!-- No meta: Referrer policy delivered via HTTP headers. -->
+ <link rel="author" title="Kristijan Burnik" href="burnik@chromium.org">
+ <link rel="help" href="https://w3c.github.io/webappsec-referrer-policy/#referrer-policy-origin">
+ <meta name="assert" content="The referrer URL is origin when a
+ document served over http requires an https
+ sub-resource via script-tag using the http-rp
+ delivery method with no-redirect and when
+ the target request is same-origin.">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <!-- TODO(kristijanburnik): Minify and merge both: -->
+ <script src="/referrer-policy/generic/common.js"></script>
+ <script src="/referrer-policy/generic/referrer-policy-test-case.js?pipe=sub"></script>
+ </head>
+ <body>
+ <script>
+ ReferrerPolicyTestCase(
+ {
+ "referrer_policy": "origin",
+ "delivery_method": "http-rp",
+ "redirection": "no-redirect",
+ "origin": "same-origin",
+ "source_protocol": "http",
+ "target_protocol": "https",
+ "subresource": "script-tag",
+ "subresource_path": "/referrer-policy/generic/subresource/script.py",
+ "referrer_url": "origin"
+ },
+ document.querySelector("meta[name=assert]").content,
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/origin/http-rp/same-origin/http-https/script-tag/generic.no-redirect.http.html.headers b/testing/web-platform/tests/referrer-policy/origin/http-rp/same-origin/http-https/script-tag/generic.no-redirect.http.html.headers
new file mode 100644
index 000000000..306a53536
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/origin/http-rp/same-origin/http-https/script-tag/generic.no-redirect.http.html.headers
@@ -0,0 +1,2 @@
+Referrer-Policy: origin
+Access-Control-Allow-Origin: *
diff --git a/testing/web-platform/tests/referrer-policy/origin/http-rp/same-origin/http-https/script-tag/generic.swap-origin-redirect.http.html b/testing/web-platform/tests/referrer-policy/origin/http-rp/same-origin/http-https/script-tag/generic.swap-origin-redirect.http.html
new file mode 100644
index 000000000..3a3e505e0
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/origin/http-rp/same-origin/http-https/script-tag/generic.swap-origin-redirect.http.html
@@ -0,0 +1,41 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by referrer-policy/generic/tools/generate.py using referrer-policy/generic/template/test.release.html.template. -->
+<html>
+ <head>
+ <title>Referrer-Policy: Referrer Policy is set to 'origin'</title>
+ <meta name="description" content="Check that all subresources in all casses get only the origin portion of the referrer URL.">
+ <!-- No meta: Referrer policy delivered via HTTP headers. -->
+ <link rel="author" title="Kristijan Burnik" href="burnik@chromium.org">
+ <link rel="help" href="https://w3c.github.io/webappsec-referrer-policy/#referrer-policy-origin">
+ <meta name="assert" content="The referrer URL is origin when a
+ document served over http requires an https
+ sub-resource via script-tag using the http-rp
+ delivery method with swap-origin-redirect and when
+ the target request is same-origin.">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <!-- TODO(kristijanburnik): Minify and merge both: -->
+ <script src="/referrer-policy/generic/common.js"></script>
+ <script src="/referrer-policy/generic/referrer-policy-test-case.js?pipe=sub"></script>
+ </head>
+ <body>
+ <script>
+ ReferrerPolicyTestCase(
+ {
+ "referrer_policy": "origin",
+ "delivery_method": "http-rp",
+ "redirection": "swap-origin-redirect",
+ "origin": "same-origin",
+ "source_protocol": "http",
+ "target_protocol": "https",
+ "subresource": "script-tag",
+ "subresource_path": "/referrer-policy/generic/subresource/script.py",
+ "referrer_url": "origin"
+ },
+ document.querySelector("meta[name=assert]").content,
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/origin/http-rp/same-origin/http-https/script-tag/generic.swap-origin-redirect.http.html.headers b/testing/web-platform/tests/referrer-policy/origin/http-rp/same-origin/http-https/script-tag/generic.swap-origin-redirect.http.html.headers
new file mode 100644
index 000000000..306a53536
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/origin/http-rp/same-origin/http-https/script-tag/generic.swap-origin-redirect.http.html.headers
@@ -0,0 +1,2 @@
+Referrer-Policy: origin
+Access-Control-Allow-Origin: *
diff --git a/testing/web-platform/tests/referrer-policy/origin/http-rp/same-origin/http-https/xhr-request/generic.keep-origin-redirect.http.html b/testing/web-platform/tests/referrer-policy/origin/http-rp/same-origin/http-https/xhr-request/generic.keep-origin-redirect.http.html
new file mode 100644
index 000000000..8cf8a9db0
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/origin/http-rp/same-origin/http-https/xhr-request/generic.keep-origin-redirect.http.html
@@ -0,0 +1,41 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by referrer-policy/generic/tools/generate.py using referrer-policy/generic/template/test.release.html.template. -->
+<html>
+ <head>
+ <title>Referrer-Policy: Referrer Policy is set to 'origin'</title>
+ <meta name="description" content="Check that all subresources in all casses get only the origin portion of the referrer URL.">
+ <!-- No meta: Referrer policy delivered via HTTP headers. -->
+ <link rel="author" title="Kristijan Burnik" href="burnik@chromium.org">
+ <link rel="help" href="https://w3c.github.io/webappsec-referrer-policy/#referrer-policy-origin">
+ <meta name="assert" content="The referrer URL is origin when a
+ document served over http requires an https
+ sub-resource via xhr-request using the http-rp
+ delivery method with keep-origin-redirect and when
+ the target request is same-origin.">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <!-- TODO(kristijanburnik): Minify and merge both: -->
+ <script src="/referrer-policy/generic/common.js"></script>
+ <script src="/referrer-policy/generic/referrer-policy-test-case.js?pipe=sub"></script>
+ </head>
+ <body>
+ <script>
+ ReferrerPolicyTestCase(
+ {
+ "referrer_policy": "origin",
+ "delivery_method": "http-rp",
+ "redirection": "keep-origin-redirect",
+ "origin": "same-origin",
+ "source_protocol": "http",
+ "target_protocol": "https",
+ "subresource": "xhr-request",
+ "subresource_path": "/referrer-policy/generic/subresource/xhr.py",
+ "referrer_url": "origin"
+ },
+ document.querySelector("meta[name=assert]").content,
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/origin/http-rp/same-origin/http-https/xhr-request/generic.keep-origin-redirect.http.html.headers b/testing/web-platform/tests/referrer-policy/origin/http-rp/same-origin/http-https/xhr-request/generic.keep-origin-redirect.http.html.headers
new file mode 100644
index 000000000..306a53536
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/origin/http-rp/same-origin/http-https/xhr-request/generic.keep-origin-redirect.http.html.headers
@@ -0,0 +1,2 @@
+Referrer-Policy: origin
+Access-Control-Allow-Origin: *
diff --git a/testing/web-platform/tests/referrer-policy/origin/http-rp/same-origin/http-https/xhr-request/generic.no-redirect.http.html b/testing/web-platform/tests/referrer-policy/origin/http-rp/same-origin/http-https/xhr-request/generic.no-redirect.http.html
new file mode 100644
index 000000000..f0e9bcfe4
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/origin/http-rp/same-origin/http-https/xhr-request/generic.no-redirect.http.html
@@ -0,0 +1,41 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by referrer-policy/generic/tools/generate.py using referrer-policy/generic/template/test.release.html.template. -->
+<html>
+ <head>
+ <title>Referrer-Policy: Referrer Policy is set to 'origin'</title>
+ <meta name="description" content="Check that all subresources in all casses get only the origin portion of the referrer URL.">
+ <!-- No meta: Referrer policy delivered via HTTP headers. -->
+ <link rel="author" title="Kristijan Burnik" href="burnik@chromium.org">
+ <link rel="help" href="https://w3c.github.io/webappsec-referrer-policy/#referrer-policy-origin">
+ <meta name="assert" content="The referrer URL is origin when a
+ document served over http requires an https
+ sub-resource via xhr-request using the http-rp
+ delivery method with no-redirect and when
+ the target request is same-origin.">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <!-- TODO(kristijanburnik): Minify and merge both: -->
+ <script src="/referrer-policy/generic/common.js"></script>
+ <script src="/referrer-policy/generic/referrer-policy-test-case.js?pipe=sub"></script>
+ </head>
+ <body>
+ <script>
+ ReferrerPolicyTestCase(
+ {
+ "referrer_policy": "origin",
+ "delivery_method": "http-rp",
+ "redirection": "no-redirect",
+ "origin": "same-origin",
+ "source_protocol": "http",
+ "target_protocol": "https",
+ "subresource": "xhr-request",
+ "subresource_path": "/referrer-policy/generic/subresource/xhr.py",
+ "referrer_url": "origin"
+ },
+ document.querySelector("meta[name=assert]").content,
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/origin/http-rp/same-origin/http-https/xhr-request/generic.no-redirect.http.html.headers b/testing/web-platform/tests/referrer-policy/origin/http-rp/same-origin/http-https/xhr-request/generic.no-redirect.http.html.headers
new file mode 100644
index 000000000..306a53536
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/origin/http-rp/same-origin/http-https/xhr-request/generic.no-redirect.http.html.headers
@@ -0,0 +1,2 @@
+Referrer-Policy: origin
+Access-Control-Allow-Origin: *
diff --git a/testing/web-platform/tests/referrer-policy/origin/http-rp/same-origin/http-https/xhr-request/generic.swap-origin-redirect.http.html b/testing/web-platform/tests/referrer-policy/origin/http-rp/same-origin/http-https/xhr-request/generic.swap-origin-redirect.http.html
new file mode 100644
index 000000000..9bb9159fa
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/origin/http-rp/same-origin/http-https/xhr-request/generic.swap-origin-redirect.http.html
@@ -0,0 +1,41 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by referrer-policy/generic/tools/generate.py using referrer-policy/generic/template/test.release.html.template. -->
+<html>
+ <head>
+ <title>Referrer-Policy: Referrer Policy is set to 'origin'</title>
+ <meta name="description" content="Check that all subresources in all casses get only the origin portion of the referrer URL.">
+ <!-- No meta: Referrer policy delivered via HTTP headers. -->
+ <link rel="author" title="Kristijan Burnik" href="burnik@chromium.org">
+ <link rel="help" href="https://w3c.github.io/webappsec-referrer-policy/#referrer-policy-origin">
+ <meta name="assert" content="The referrer URL is origin when a
+ document served over http requires an https
+ sub-resource via xhr-request using the http-rp
+ delivery method with swap-origin-redirect and when
+ the target request is same-origin.">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <!-- TODO(kristijanburnik): Minify and merge both: -->
+ <script src="/referrer-policy/generic/common.js"></script>
+ <script src="/referrer-policy/generic/referrer-policy-test-case.js?pipe=sub"></script>
+ </head>
+ <body>
+ <script>
+ ReferrerPolicyTestCase(
+ {
+ "referrer_policy": "origin",
+ "delivery_method": "http-rp",
+ "redirection": "swap-origin-redirect",
+ "origin": "same-origin",
+ "source_protocol": "http",
+ "target_protocol": "https",
+ "subresource": "xhr-request",
+ "subresource_path": "/referrer-policy/generic/subresource/xhr.py",
+ "referrer_url": "origin"
+ },
+ document.querySelector("meta[name=assert]").content,
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/origin/http-rp/same-origin/http-https/xhr-request/generic.swap-origin-redirect.http.html.headers b/testing/web-platform/tests/referrer-policy/origin/http-rp/same-origin/http-https/xhr-request/generic.swap-origin-redirect.http.html.headers
new file mode 100644
index 000000000..306a53536
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/origin/http-rp/same-origin/http-https/xhr-request/generic.swap-origin-redirect.http.html.headers
@@ -0,0 +1,2 @@
+Referrer-Policy: origin
+Access-Control-Allow-Origin: *
diff --git a/testing/web-platform/tests/referrer-policy/origin/meta-referrer/cross-origin/http-http/fetch-request/generic.keep-origin-redirect.http.html b/testing/web-platform/tests/referrer-policy/origin/meta-referrer/cross-origin/http-http/fetch-request/generic.keep-origin-redirect.http.html
new file mode 100644
index 000000000..66cad9817
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/origin/meta-referrer/cross-origin/http-http/fetch-request/generic.keep-origin-redirect.http.html
@@ -0,0 +1,41 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by referrer-policy/generic/tools/generate.py using referrer-policy/generic/template/test.release.html.template. -->
+<html>
+ <head>
+ <title>Referrer-Policy: Referrer Policy is set to 'origin'</title>
+ <meta name="description" content="Check that all subresources in all casses get only the origin portion of the referrer URL.">
+ <meta name="referrer" content="origin">
+ <link rel="author" title="Kristijan Burnik" href="burnik@chromium.org">
+ <link rel="help" href="https://w3c.github.io/webappsec-referrer-policy/#referrer-policy-origin">
+ <meta name="assert" content="The referrer URL is origin when a
+ document served over http requires an http
+ sub-resource via fetch-request using the meta-referrer
+ delivery method with keep-origin-redirect and when
+ the target request is cross-origin.">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <!-- TODO(kristijanburnik): Minify and merge both: -->
+ <script src="/referrer-policy/generic/common.js"></script>
+ <script src="/referrer-policy/generic/referrer-policy-test-case.js?pipe=sub"></script>
+ </head>
+ <body>
+ <script>
+ ReferrerPolicyTestCase(
+ {
+ "referrer_policy": "origin",
+ "delivery_method": "meta-referrer",
+ "redirection": "keep-origin-redirect",
+ "origin": "cross-origin",
+ "source_protocol": "http",
+ "target_protocol": "http",
+ "subresource": "fetch-request",
+ "subresource_path": "/referrer-policy/generic/subresource/xhr.py",
+ "referrer_url": "origin"
+ },
+ document.querySelector("meta[name=assert]").content,
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/origin/meta-referrer/cross-origin/http-http/fetch-request/generic.no-redirect.http.html b/testing/web-platform/tests/referrer-policy/origin/meta-referrer/cross-origin/http-http/fetch-request/generic.no-redirect.http.html
new file mode 100644
index 000000000..373a9a1fb
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/origin/meta-referrer/cross-origin/http-http/fetch-request/generic.no-redirect.http.html
@@ -0,0 +1,41 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by referrer-policy/generic/tools/generate.py using referrer-policy/generic/template/test.release.html.template. -->
+<html>
+ <head>
+ <title>Referrer-Policy: Referrer Policy is set to 'origin'</title>
+ <meta name="description" content="Check that all subresources in all casses get only the origin portion of the referrer URL.">
+ <meta name="referrer" content="origin">
+ <link rel="author" title="Kristijan Burnik" href="burnik@chromium.org">
+ <link rel="help" href="https://w3c.github.io/webappsec-referrer-policy/#referrer-policy-origin">
+ <meta name="assert" content="The referrer URL is origin when a
+ document served over http requires an http
+ sub-resource via fetch-request using the meta-referrer
+ delivery method with no-redirect and when
+ the target request is cross-origin.">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <!-- TODO(kristijanburnik): Minify and merge both: -->
+ <script src="/referrer-policy/generic/common.js"></script>
+ <script src="/referrer-policy/generic/referrer-policy-test-case.js?pipe=sub"></script>
+ </head>
+ <body>
+ <script>
+ ReferrerPolicyTestCase(
+ {
+ "referrer_policy": "origin",
+ "delivery_method": "meta-referrer",
+ "redirection": "no-redirect",
+ "origin": "cross-origin",
+ "source_protocol": "http",
+ "target_protocol": "http",
+ "subresource": "fetch-request",
+ "subresource_path": "/referrer-policy/generic/subresource/xhr.py",
+ "referrer_url": "origin"
+ },
+ document.querySelector("meta[name=assert]").content,
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/origin/meta-referrer/cross-origin/http-http/fetch-request/generic.swap-origin-redirect.http.html b/testing/web-platform/tests/referrer-policy/origin/meta-referrer/cross-origin/http-http/fetch-request/generic.swap-origin-redirect.http.html
new file mode 100644
index 000000000..0661bda2b
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/origin/meta-referrer/cross-origin/http-http/fetch-request/generic.swap-origin-redirect.http.html
@@ -0,0 +1,41 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by referrer-policy/generic/tools/generate.py using referrer-policy/generic/template/test.release.html.template. -->
+<html>
+ <head>
+ <title>Referrer-Policy: Referrer Policy is set to 'origin'</title>
+ <meta name="description" content="Check that all subresources in all casses get only the origin portion of the referrer URL.">
+ <meta name="referrer" content="origin">
+ <link rel="author" title="Kristijan Burnik" href="burnik@chromium.org">
+ <link rel="help" href="https://w3c.github.io/webappsec-referrer-policy/#referrer-policy-origin">
+ <meta name="assert" content="The referrer URL is origin when a
+ document served over http requires an http
+ sub-resource via fetch-request using the meta-referrer
+ delivery method with swap-origin-redirect and when
+ the target request is cross-origin.">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <!-- TODO(kristijanburnik): Minify and merge both: -->
+ <script src="/referrer-policy/generic/common.js"></script>
+ <script src="/referrer-policy/generic/referrer-policy-test-case.js?pipe=sub"></script>
+ </head>
+ <body>
+ <script>
+ ReferrerPolicyTestCase(
+ {
+ "referrer_policy": "origin",
+ "delivery_method": "meta-referrer",
+ "redirection": "swap-origin-redirect",
+ "origin": "cross-origin",
+ "source_protocol": "http",
+ "target_protocol": "http",
+ "subresource": "fetch-request",
+ "subresource_path": "/referrer-policy/generic/subresource/xhr.py",
+ "referrer_url": "origin"
+ },
+ document.querySelector("meta[name=assert]").content,
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/origin/meta-referrer/cross-origin/http-http/iframe-tag/generic.keep-origin-redirect.http.html b/testing/web-platform/tests/referrer-policy/origin/meta-referrer/cross-origin/http-http/iframe-tag/generic.keep-origin-redirect.http.html
new file mode 100644
index 000000000..95cfae315
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/origin/meta-referrer/cross-origin/http-http/iframe-tag/generic.keep-origin-redirect.http.html
@@ -0,0 +1,41 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by referrer-policy/generic/tools/generate.py using referrer-policy/generic/template/test.release.html.template. -->
+<html>
+ <head>
+ <title>Referrer-Policy: Referrer Policy is set to 'origin'</title>
+ <meta name="description" content="Check that all subresources in all casses get only the origin portion of the referrer URL.">
+ <meta name="referrer" content="origin">
+ <link rel="author" title="Kristijan Burnik" href="burnik@chromium.org">
+ <link rel="help" href="https://w3c.github.io/webappsec-referrer-policy/#referrer-policy-origin">
+ <meta name="assert" content="The referrer URL is origin when a
+ document served over http requires an http
+ sub-resource via iframe-tag using the meta-referrer
+ delivery method with keep-origin-redirect and when
+ the target request is cross-origin.">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <!-- TODO(kristijanburnik): Minify and merge both: -->
+ <script src="/referrer-policy/generic/common.js"></script>
+ <script src="/referrer-policy/generic/referrer-policy-test-case.js?pipe=sub"></script>
+ </head>
+ <body>
+ <script>
+ ReferrerPolicyTestCase(
+ {
+ "referrer_policy": "origin",
+ "delivery_method": "meta-referrer",
+ "redirection": "keep-origin-redirect",
+ "origin": "cross-origin",
+ "source_protocol": "http",
+ "target_protocol": "http",
+ "subresource": "iframe-tag",
+ "subresource_path": "/referrer-policy/generic/subresource/document.py",
+ "referrer_url": "origin"
+ },
+ document.querySelector("meta[name=assert]").content,
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/origin/meta-referrer/cross-origin/http-http/iframe-tag/generic.no-redirect.http.html b/testing/web-platform/tests/referrer-policy/origin/meta-referrer/cross-origin/http-http/iframe-tag/generic.no-redirect.http.html
new file mode 100644
index 000000000..5631be438
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/origin/meta-referrer/cross-origin/http-http/iframe-tag/generic.no-redirect.http.html
@@ -0,0 +1,41 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by referrer-policy/generic/tools/generate.py using referrer-policy/generic/template/test.release.html.template. -->
+<html>
+ <head>
+ <title>Referrer-Policy: Referrer Policy is set to 'origin'</title>
+ <meta name="description" content="Check that all subresources in all casses get only the origin portion of the referrer URL.">
+ <meta name="referrer" content="origin">
+ <link rel="author" title="Kristijan Burnik" href="burnik@chromium.org">
+ <link rel="help" href="https://w3c.github.io/webappsec-referrer-policy/#referrer-policy-origin">
+ <meta name="assert" content="The referrer URL is origin when a
+ document served over http requires an http
+ sub-resource via iframe-tag using the meta-referrer
+ delivery method with no-redirect and when
+ the target request is cross-origin.">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <!-- TODO(kristijanburnik): Minify and merge both: -->
+ <script src="/referrer-policy/generic/common.js"></script>
+ <script src="/referrer-policy/generic/referrer-policy-test-case.js?pipe=sub"></script>
+ </head>
+ <body>
+ <script>
+ ReferrerPolicyTestCase(
+ {
+ "referrer_policy": "origin",
+ "delivery_method": "meta-referrer",
+ "redirection": "no-redirect",
+ "origin": "cross-origin",
+ "source_protocol": "http",
+ "target_protocol": "http",
+ "subresource": "iframe-tag",
+ "subresource_path": "/referrer-policy/generic/subresource/document.py",
+ "referrer_url": "origin"
+ },
+ document.querySelector("meta[name=assert]").content,
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/origin/meta-referrer/cross-origin/http-http/iframe-tag/generic.swap-origin-redirect.http.html b/testing/web-platform/tests/referrer-policy/origin/meta-referrer/cross-origin/http-http/iframe-tag/generic.swap-origin-redirect.http.html
new file mode 100644
index 000000000..c5f2de32e
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/origin/meta-referrer/cross-origin/http-http/iframe-tag/generic.swap-origin-redirect.http.html
@@ -0,0 +1,41 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by referrer-policy/generic/tools/generate.py using referrer-policy/generic/template/test.release.html.template. -->
+<html>
+ <head>
+ <title>Referrer-Policy: Referrer Policy is set to 'origin'</title>
+ <meta name="description" content="Check that all subresources in all casses get only the origin portion of the referrer URL.">
+ <meta name="referrer" content="origin">
+ <link rel="author" title="Kristijan Burnik" href="burnik@chromium.org">
+ <link rel="help" href="https://w3c.github.io/webappsec-referrer-policy/#referrer-policy-origin">
+ <meta name="assert" content="The referrer URL is origin when a
+ document served over http requires an http
+ sub-resource via iframe-tag using the meta-referrer
+ delivery method with swap-origin-redirect and when
+ the target request is cross-origin.">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <!-- TODO(kristijanburnik): Minify and merge both: -->
+ <script src="/referrer-policy/generic/common.js"></script>
+ <script src="/referrer-policy/generic/referrer-policy-test-case.js?pipe=sub"></script>
+ </head>
+ <body>
+ <script>
+ ReferrerPolicyTestCase(
+ {
+ "referrer_policy": "origin",
+ "delivery_method": "meta-referrer",
+ "redirection": "swap-origin-redirect",
+ "origin": "cross-origin",
+ "source_protocol": "http",
+ "target_protocol": "http",
+ "subresource": "iframe-tag",
+ "subresource_path": "/referrer-policy/generic/subresource/document.py",
+ "referrer_url": "origin"
+ },
+ document.querySelector("meta[name=assert]").content,
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/origin/meta-referrer/cross-origin/http-http/img-tag/generic.keep-origin-redirect.http.html b/testing/web-platform/tests/referrer-policy/origin/meta-referrer/cross-origin/http-http/img-tag/generic.keep-origin-redirect.http.html
new file mode 100644
index 000000000..e676621b2
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/origin/meta-referrer/cross-origin/http-http/img-tag/generic.keep-origin-redirect.http.html
@@ -0,0 +1,41 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by referrer-policy/generic/tools/generate.py using referrer-policy/generic/template/test.release.html.template. -->
+<html>
+ <head>
+ <title>Referrer-Policy: Referrer Policy is set to 'origin'</title>
+ <meta name="description" content="Check that all subresources in all casses get only the origin portion of the referrer URL.">
+ <meta name="referrer" content="origin">
+ <link rel="author" title="Kristijan Burnik" href="burnik@chromium.org">
+ <link rel="help" href="https://w3c.github.io/webappsec-referrer-policy/#referrer-policy-origin">
+ <meta name="assert" content="The referrer URL is origin when a
+ document served over http requires an http
+ sub-resource via img-tag using the meta-referrer
+ delivery method with keep-origin-redirect and when
+ the target request is cross-origin.">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <!-- TODO(kristijanburnik): Minify and merge both: -->
+ <script src="/referrer-policy/generic/common.js"></script>
+ <script src="/referrer-policy/generic/referrer-policy-test-case.js?pipe=sub"></script>
+ </head>
+ <body>
+ <script>
+ ReferrerPolicyTestCase(
+ {
+ "referrer_policy": "origin",
+ "delivery_method": "meta-referrer",
+ "redirection": "keep-origin-redirect",
+ "origin": "cross-origin",
+ "source_protocol": "http",
+ "target_protocol": "http",
+ "subresource": "img-tag",
+ "subresource_path": "/referrer-policy/generic/subresource/image.py",
+ "referrer_url": "origin"
+ },
+ document.querySelector("meta[name=assert]").content,
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/origin/meta-referrer/cross-origin/http-http/img-tag/generic.no-redirect.http.html b/testing/web-platform/tests/referrer-policy/origin/meta-referrer/cross-origin/http-http/img-tag/generic.no-redirect.http.html
new file mode 100644
index 000000000..d1f431ffd
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/origin/meta-referrer/cross-origin/http-http/img-tag/generic.no-redirect.http.html
@@ -0,0 +1,41 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by referrer-policy/generic/tools/generate.py using referrer-policy/generic/template/test.release.html.template. -->
+<html>
+ <head>
+ <title>Referrer-Policy: Referrer Policy is set to 'origin'</title>
+ <meta name="description" content="Check that all subresources in all casses get only the origin portion of the referrer URL.">
+ <meta name="referrer" content="origin">
+ <link rel="author" title="Kristijan Burnik" href="burnik@chromium.org">
+ <link rel="help" href="https://w3c.github.io/webappsec-referrer-policy/#referrer-policy-origin">
+ <meta name="assert" content="The referrer URL is origin when a
+ document served over http requires an http
+ sub-resource via img-tag using the meta-referrer
+ delivery method with no-redirect and when
+ the target request is cross-origin.">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <!-- TODO(kristijanburnik): Minify and merge both: -->
+ <script src="/referrer-policy/generic/common.js"></script>
+ <script src="/referrer-policy/generic/referrer-policy-test-case.js?pipe=sub"></script>
+ </head>
+ <body>
+ <script>
+ ReferrerPolicyTestCase(
+ {
+ "referrer_policy": "origin",
+ "delivery_method": "meta-referrer",
+ "redirection": "no-redirect",
+ "origin": "cross-origin",
+ "source_protocol": "http",
+ "target_protocol": "http",
+ "subresource": "img-tag",
+ "subresource_path": "/referrer-policy/generic/subresource/image.py",
+ "referrer_url": "origin"
+ },
+ document.querySelector("meta[name=assert]").content,
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/origin/meta-referrer/cross-origin/http-http/img-tag/generic.swap-origin-redirect.http.html b/testing/web-platform/tests/referrer-policy/origin/meta-referrer/cross-origin/http-http/img-tag/generic.swap-origin-redirect.http.html
new file mode 100644
index 000000000..10ba9c188
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/origin/meta-referrer/cross-origin/http-http/img-tag/generic.swap-origin-redirect.http.html
@@ -0,0 +1,41 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by referrer-policy/generic/tools/generate.py using referrer-policy/generic/template/test.release.html.template. -->
+<html>
+ <head>
+ <title>Referrer-Policy: Referrer Policy is set to 'origin'</title>
+ <meta name="description" content="Check that all subresources in all casses get only the origin portion of the referrer URL.">
+ <meta name="referrer" content="origin">
+ <link rel="author" title="Kristijan Burnik" href="burnik@chromium.org">
+ <link rel="help" href="https://w3c.github.io/webappsec-referrer-policy/#referrer-policy-origin">
+ <meta name="assert" content="The referrer URL is origin when a
+ document served over http requires an http
+ sub-resource via img-tag using the meta-referrer
+ delivery method with swap-origin-redirect and when
+ the target request is cross-origin.">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <!-- TODO(kristijanburnik): Minify and merge both: -->
+ <script src="/referrer-policy/generic/common.js"></script>
+ <script src="/referrer-policy/generic/referrer-policy-test-case.js?pipe=sub"></script>
+ </head>
+ <body>
+ <script>
+ ReferrerPolicyTestCase(
+ {
+ "referrer_policy": "origin",
+ "delivery_method": "meta-referrer",
+ "redirection": "swap-origin-redirect",
+ "origin": "cross-origin",
+ "source_protocol": "http",
+ "target_protocol": "http",
+ "subresource": "img-tag",
+ "subresource_path": "/referrer-policy/generic/subresource/image.py",
+ "referrer_url": "origin"
+ },
+ document.querySelector("meta[name=assert]").content,
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/origin/meta-referrer/cross-origin/http-http/script-tag/generic.keep-origin-redirect.http.html b/testing/web-platform/tests/referrer-policy/origin/meta-referrer/cross-origin/http-http/script-tag/generic.keep-origin-redirect.http.html
new file mode 100644
index 000000000..78762fe53
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/origin/meta-referrer/cross-origin/http-http/script-tag/generic.keep-origin-redirect.http.html
@@ -0,0 +1,41 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by referrer-policy/generic/tools/generate.py using referrer-policy/generic/template/test.release.html.template. -->
+<html>
+ <head>
+ <title>Referrer-Policy: Referrer Policy is set to 'origin'</title>
+ <meta name="description" content="Check that all subresources in all casses get only the origin portion of the referrer URL.">
+ <meta name="referrer" content="origin">
+ <link rel="author" title="Kristijan Burnik" href="burnik@chromium.org">
+ <link rel="help" href="https://w3c.github.io/webappsec-referrer-policy/#referrer-policy-origin">
+ <meta name="assert" content="The referrer URL is origin when a
+ document served over http requires an http
+ sub-resource via script-tag using the meta-referrer
+ delivery method with keep-origin-redirect and when
+ the target request is cross-origin.">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <!-- TODO(kristijanburnik): Minify and merge both: -->
+ <script src="/referrer-policy/generic/common.js"></script>
+ <script src="/referrer-policy/generic/referrer-policy-test-case.js?pipe=sub"></script>
+ </head>
+ <body>
+ <script>
+ ReferrerPolicyTestCase(
+ {
+ "referrer_policy": "origin",
+ "delivery_method": "meta-referrer",
+ "redirection": "keep-origin-redirect",
+ "origin": "cross-origin",
+ "source_protocol": "http",
+ "target_protocol": "http",
+ "subresource": "script-tag",
+ "subresource_path": "/referrer-policy/generic/subresource/script.py",
+ "referrer_url": "origin"
+ },
+ document.querySelector("meta[name=assert]").content,
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/origin/meta-referrer/cross-origin/http-http/script-tag/generic.no-redirect.http.html b/testing/web-platform/tests/referrer-policy/origin/meta-referrer/cross-origin/http-http/script-tag/generic.no-redirect.http.html
new file mode 100644
index 000000000..8580bf41e
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/origin/meta-referrer/cross-origin/http-http/script-tag/generic.no-redirect.http.html
@@ -0,0 +1,41 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by referrer-policy/generic/tools/generate.py using referrer-policy/generic/template/test.release.html.template. -->
+<html>
+ <head>
+ <title>Referrer-Policy: Referrer Policy is set to 'origin'</title>
+ <meta name="description" content="Check that all subresources in all casses get only the origin portion of the referrer URL.">
+ <meta name="referrer" content="origin">
+ <link rel="author" title="Kristijan Burnik" href="burnik@chromium.org">
+ <link rel="help" href="https://w3c.github.io/webappsec-referrer-policy/#referrer-policy-origin">
+ <meta name="assert" content="The referrer URL is origin when a
+ document served over http requires an http
+ sub-resource via script-tag using the meta-referrer
+ delivery method with no-redirect and when
+ the target request is cross-origin.">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <!-- TODO(kristijanburnik): Minify and merge both: -->
+ <script src="/referrer-policy/generic/common.js"></script>
+ <script src="/referrer-policy/generic/referrer-policy-test-case.js?pipe=sub"></script>
+ </head>
+ <body>
+ <script>
+ ReferrerPolicyTestCase(
+ {
+ "referrer_policy": "origin",
+ "delivery_method": "meta-referrer",
+ "redirection": "no-redirect",
+ "origin": "cross-origin",
+ "source_protocol": "http",
+ "target_protocol": "http",
+ "subresource": "script-tag",
+ "subresource_path": "/referrer-policy/generic/subresource/script.py",
+ "referrer_url": "origin"
+ },
+ document.querySelector("meta[name=assert]").content,
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/origin/meta-referrer/cross-origin/http-http/script-tag/generic.swap-origin-redirect.http.html b/testing/web-platform/tests/referrer-policy/origin/meta-referrer/cross-origin/http-http/script-tag/generic.swap-origin-redirect.http.html
new file mode 100644
index 000000000..740cca8ff
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/origin/meta-referrer/cross-origin/http-http/script-tag/generic.swap-origin-redirect.http.html
@@ -0,0 +1,41 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by referrer-policy/generic/tools/generate.py using referrer-policy/generic/template/test.release.html.template. -->
+<html>
+ <head>
+ <title>Referrer-Policy: Referrer Policy is set to 'origin'</title>
+ <meta name="description" content="Check that all subresources in all casses get only the origin portion of the referrer URL.">
+ <meta name="referrer" content="origin">
+ <link rel="author" title="Kristijan Burnik" href="burnik@chromium.org">
+ <link rel="help" href="https://w3c.github.io/webappsec-referrer-policy/#referrer-policy-origin">
+ <meta name="assert" content="The referrer URL is origin when a
+ document served over http requires an http
+ sub-resource via script-tag using the meta-referrer
+ delivery method with swap-origin-redirect and when
+ the target request is cross-origin.">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <!-- TODO(kristijanburnik): Minify and merge both: -->
+ <script src="/referrer-policy/generic/common.js"></script>
+ <script src="/referrer-policy/generic/referrer-policy-test-case.js?pipe=sub"></script>
+ </head>
+ <body>
+ <script>
+ ReferrerPolicyTestCase(
+ {
+ "referrer_policy": "origin",
+ "delivery_method": "meta-referrer",
+ "redirection": "swap-origin-redirect",
+ "origin": "cross-origin",
+ "source_protocol": "http",
+ "target_protocol": "http",
+ "subresource": "script-tag",
+ "subresource_path": "/referrer-policy/generic/subresource/script.py",
+ "referrer_url": "origin"
+ },
+ document.querySelector("meta[name=assert]").content,
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/origin/meta-referrer/cross-origin/http-http/xhr-request/generic.keep-origin-redirect.http.html b/testing/web-platform/tests/referrer-policy/origin/meta-referrer/cross-origin/http-http/xhr-request/generic.keep-origin-redirect.http.html
new file mode 100644
index 000000000..38096523b
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/origin/meta-referrer/cross-origin/http-http/xhr-request/generic.keep-origin-redirect.http.html
@@ -0,0 +1,41 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by referrer-policy/generic/tools/generate.py using referrer-policy/generic/template/test.release.html.template. -->
+<html>
+ <head>
+ <title>Referrer-Policy: Referrer Policy is set to 'origin'</title>
+ <meta name="description" content="Check that all subresources in all casses get only the origin portion of the referrer URL.">
+ <meta name="referrer" content="origin">
+ <link rel="author" title="Kristijan Burnik" href="burnik@chromium.org">
+ <link rel="help" href="https://w3c.github.io/webappsec-referrer-policy/#referrer-policy-origin">
+ <meta name="assert" content="The referrer URL is origin when a
+ document served over http requires an http
+ sub-resource via xhr-request using the meta-referrer
+ delivery method with keep-origin-redirect and when
+ the target request is cross-origin.">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <!-- TODO(kristijanburnik): Minify and merge both: -->
+ <script src="/referrer-policy/generic/common.js"></script>
+ <script src="/referrer-policy/generic/referrer-policy-test-case.js?pipe=sub"></script>
+ </head>
+ <body>
+ <script>
+ ReferrerPolicyTestCase(
+ {
+ "referrer_policy": "origin",
+ "delivery_method": "meta-referrer",
+ "redirection": "keep-origin-redirect",
+ "origin": "cross-origin",
+ "source_protocol": "http",
+ "target_protocol": "http",
+ "subresource": "xhr-request",
+ "subresource_path": "/referrer-policy/generic/subresource/xhr.py",
+ "referrer_url": "origin"
+ },
+ document.querySelector("meta[name=assert]").content,
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/origin/meta-referrer/cross-origin/http-http/xhr-request/generic.no-redirect.http.html b/testing/web-platform/tests/referrer-policy/origin/meta-referrer/cross-origin/http-http/xhr-request/generic.no-redirect.http.html
new file mode 100644
index 000000000..9d1db30f6
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/origin/meta-referrer/cross-origin/http-http/xhr-request/generic.no-redirect.http.html
@@ -0,0 +1,41 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by referrer-policy/generic/tools/generate.py using referrer-policy/generic/template/test.release.html.template. -->
+<html>
+ <head>
+ <title>Referrer-Policy: Referrer Policy is set to 'origin'</title>
+ <meta name="description" content="Check that all subresources in all casses get only the origin portion of the referrer URL.">
+ <meta name="referrer" content="origin">
+ <link rel="author" title="Kristijan Burnik" href="burnik@chromium.org">
+ <link rel="help" href="https://w3c.github.io/webappsec-referrer-policy/#referrer-policy-origin">
+ <meta name="assert" content="The referrer URL is origin when a
+ document served over http requires an http
+ sub-resource via xhr-request using the meta-referrer
+ delivery method with no-redirect and when
+ the target request is cross-origin.">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <!-- TODO(kristijanburnik): Minify and merge both: -->
+ <script src="/referrer-policy/generic/common.js"></script>
+ <script src="/referrer-policy/generic/referrer-policy-test-case.js?pipe=sub"></script>
+ </head>
+ <body>
+ <script>
+ ReferrerPolicyTestCase(
+ {
+ "referrer_policy": "origin",
+ "delivery_method": "meta-referrer",
+ "redirection": "no-redirect",
+ "origin": "cross-origin",
+ "source_protocol": "http",
+ "target_protocol": "http",
+ "subresource": "xhr-request",
+ "subresource_path": "/referrer-policy/generic/subresource/xhr.py",
+ "referrer_url": "origin"
+ },
+ document.querySelector("meta[name=assert]").content,
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/origin/meta-referrer/cross-origin/http-http/xhr-request/generic.swap-origin-redirect.http.html b/testing/web-platform/tests/referrer-policy/origin/meta-referrer/cross-origin/http-http/xhr-request/generic.swap-origin-redirect.http.html
new file mode 100644
index 000000000..f28bd6734
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/origin/meta-referrer/cross-origin/http-http/xhr-request/generic.swap-origin-redirect.http.html
@@ -0,0 +1,41 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by referrer-policy/generic/tools/generate.py using referrer-policy/generic/template/test.release.html.template. -->
+<html>
+ <head>
+ <title>Referrer-Policy: Referrer Policy is set to 'origin'</title>
+ <meta name="description" content="Check that all subresources in all casses get only the origin portion of the referrer URL.">
+ <meta name="referrer" content="origin">
+ <link rel="author" title="Kristijan Burnik" href="burnik@chromium.org">
+ <link rel="help" href="https://w3c.github.io/webappsec-referrer-policy/#referrer-policy-origin">
+ <meta name="assert" content="The referrer URL is origin when a
+ document served over http requires an http
+ sub-resource via xhr-request using the meta-referrer
+ delivery method with swap-origin-redirect and when
+ the target request is cross-origin.">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <!-- TODO(kristijanburnik): Minify and merge both: -->
+ <script src="/referrer-policy/generic/common.js"></script>
+ <script src="/referrer-policy/generic/referrer-policy-test-case.js?pipe=sub"></script>
+ </head>
+ <body>
+ <script>
+ ReferrerPolicyTestCase(
+ {
+ "referrer_policy": "origin",
+ "delivery_method": "meta-referrer",
+ "redirection": "swap-origin-redirect",
+ "origin": "cross-origin",
+ "source_protocol": "http",
+ "target_protocol": "http",
+ "subresource": "xhr-request",
+ "subresource_path": "/referrer-policy/generic/subresource/xhr.py",
+ "referrer_url": "origin"
+ },
+ document.querySelector("meta[name=assert]").content,
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/origin/meta-referrer/cross-origin/http-https/fetch-request/generic.keep-origin-redirect.http.html b/testing/web-platform/tests/referrer-policy/origin/meta-referrer/cross-origin/http-https/fetch-request/generic.keep-origin-redirect.http.html
new file mode 100644
index 000000000..52ea79ea3
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/origin/meta-referrer/cross-origin/http-https/fetch-request/generic.keep-origin-redirect.http.html
@@ -0,0 +1,41 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by referrer-policy/generic/tools/generate.py using referrer-policy/generic/template/test.release.html.template. -->
+<html>
+ <head>
+ <title>Referrer-Policy: Referrer Policy is set to 'origin'</title>
+ <meta name="description" content="Check that all subresources in all casses get only the origin portion of the referrer URL.">
+ <meta name="referrer" content="origin">
+ <link rel="author" title="Kristijan Burnik" href="burnik@chromium.org">
+ <link rel="help" href="https://w3c.github.io/webappsec-referrer-policy/#referrer-policy-origin">
+ <meta name="assert" content="The referrer URL is origin when a
+ document served over http requires an https
+ sub-resource via fetch-request using the meta-referrer
+ delivery method with keep-origin-redirect and when
+ the target request is cross-origin.">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <!-- TODO(kristijanburnik): Minify and merge both: -->
+ <script src="/referrer-policy/generic/common.js"></script>
+ <script src="/referrer-policy/generic/referrer-policy-test-case.js?pipe=sub"></script>
+ </head>
+ <body>
+ <script>
+ ReferrerPolicyTestCase(
+ {
+ "referrer_policy": "origin",
+ "delivery_method": "meta-referrer",
+ "redirection": "keep-origin-redirect",
+ "origin": "cross-origin",
+ "source_protocol": "http",
+ "target_protocol": "https",
+ "subresource": "fetch-request",
+ "subresource_path": "/referrer-policy/generic/subresource/xhr.py",
+ "referrer_url": "origin"
+ },
+ document.querySelector("meta[name=assert]").content,
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/origin/meta-referrer/cross-origin/http-https/fetch-request/generic.no-redirect.http.html b/testing/web-platform/tests/referrer-policy/origin/meta-referrer/cross-origin/http-https/fetch-request/generic.no-redirect.http.html
new file mode 100644
index 000000000..45bc707ab
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/origin/meta-referrer/cross-origin/http-https/fetch-request/generic.no-redirect.http.html
@@ -0,0 +1,41 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by referrer-policy/generic/tools/generate.py using referrer-policy/generic/template/test.release.html.template. -->
+<html>
+ <head>
+ <title>Referrer-Policy: Referrer Policy is set to 'origin'</title>
+ <meta name="description" content="Check that all subresources in all casses get only the origin portion of the referrer URL.">
+ <meta name="referrer" content="origin">
+ <link rel="author" title="Kristijan Burnik" href="burnik@chromium.org">
+ <link rel="help" href="https://w3c.github.io/webappsec-referrer-policy/#referrer-policy-origin">
+ <meta name="assert" content="The referrer URL is origin when a
+ document served over http requires an https
+ sub-resource via fetch-request using the meta-referrer
+ delivery method with no-redirect and when
+ the target request is cross-origin.">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <!-- TODO(kristijanburnik): Minify and merge both: -->
+ <script src="/referrer-policy/generic/common.js"></script>
+ <script src="/referrer-policy/generic/referrer-policy-test-case.js?pipe=sub"></script>
+ </head>
+ <body>
+ <script>
+ ReferrerPolicyTestCase(
+ {
+ "referrer_policy": "origin",
+ "delivery_method": "meta-referrer",
+ "redirection": "no-redirect",
+ "origin": "cross-origin",
+ "source_protocol": "http",
+ "target_protocol": "https",
+ "subresource": "fetch-request",
+ "subresource_path": "/referrer-policy/generic/subresource/xhr.py",
+ "referrer_url": "origin"
+ },
+ document.querySelector("meta[name=assert]").content,
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/origin/meta-referrer/cross-origin/http-https/fetch-request/generic.swap-origin-redirect.http.html b/testing/web-platform/tests/referrer-policy/origin/meta-referrer/cross-origin/http-https/fetch-request/generic.swap-origin-redirect.http.html
new file mode 100644
index 000000000..d80387047
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/origin/meta-referrer/cross-origin/http-https/fetch-request/generic.swap-origin-redirect.http.html
@@ -0,0 +1,41 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by referrer-policy/generic/tools/generate.py using referrer-policy/generic/template/test.release.html.template. -->
+<html>
+ <head>
+ <title>Referrer-Policy: Referrer Policy is set to 'origin'</title>
+ <meta name="description" content="Check that all subresources in all casses get only the origin portion of the referrer URL.">
+ <meta name="referrer" content="origin">
+ <link rel="author" title="Kristijan Burnik" href="burnik@chromium.org">
+ <link rel="help" href="https://w3c.github.io/webappsec-referrer-policy/#referrer-policy-origin">
+ <meta name="assert" content="The referrer URL is origin when a
+ document served over http requires an https
+ sub-resource via fetch-request using the meta-referrer
+ delivery method with swap-origin-redirect and when
+ the target request is cross-origin.">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <!-- TODO(kristijanburnik): Minify and merge both: -->
+ <script src="/referrer-policy/generic/common.js"></script>
+ <script src="/referrer-policy/generic/referrer-policy-test-case.js?pipe=sub"></script>
+ </head>
+ <body>
+ <script>
+ ReferrerPolicyTestCase(
+ {
+ "referrer_policy": "origin",
+ "delivery_method": "meta-referrer",
+ "redirection": "swap-origin-redirect",
+ "origin": "cross-origin",
+ "source_protocol": "http",
+ "target_protocol": "https",
+ "subresource": "fetch-request",
+ "subresource_path": "/referrer-policy/generic/subresource/xhr.py",
+ "referrer_url": "origin"
+ },
+ document.querySelector("meta[name=assert]").content,
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/origin/meta-referrer/cross-origin/http-https/iframe-tag/generic.keep-origin-redirect.http.html b/testing/web-platform/tests/referrer-policy/origin/meta-referrer/cross-origin/http-https/iframe-tag/generic.keep-origin-redirect.http.html
new file mode 100644
index 000000000..6465e10c9
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/origin/meta-referrer/cross-origin/http-https/iframe-tag/generic.keep-origin-redirect.http.html
@@ -0,0 +1,41 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by referrer-policy/generic/tools/generate.py using referrer-policy/generic/template/test.release.html.template. -->
+<html>
+ <head>
+ <title>Referrer-Policy: Referrer Policy is set to 'origin'</title>
+ <meta name="description" content="Check that all subresources in all casses get only the origin portion of the referrer URL.">
+ <meta name="referrer" content="origin">
+ <link rel="author" title="Kristijan Burnik" href="burnik@chromium.org">
+ <link rel="help" href="https://w3c.github.io/webappsec-referrer-policy/#referrer-policy-origin">
+ <meta name="assert" content="The referrer URL is origin when a
+ document served over http requires an https
+ sub-resource via iframe-tag using the meta-referrer
+ delivery method with keep-origin-redirect and when
+ the target request is cross-origin.">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <!-- TODO(kristijanburnik): Minify and merge both: -->
+ <script src="/referrer-policy/generic/common.js"></script>
+ <script src="/referrer-policy/generic/referrer-policy-test-case.js?pipe=sub"></script>
+ </head>
+ <body>
+ <script>
+ ReferrerPolicyTestCase(
+ {
+ "referrer_policy": "origin",
+ "delivery_method": "meta-referrer",
+ "redirection": "keep-origin-redirect",
+ "origin": "cross-origin",
+ "source_protocol": "http",
+ "target_protocol": "https",
+ "subresource": "iframe-tag",
+ "subresource_path": "/referrer-policy/generic/subresource/document.py",
+ "referrer_url": "origin"
+ },
+ document.querySelector("meta[name=assert]").content,
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/origin/meta-referrer/cross-origin/http-https/iframe-tag/generic.no-redirect.http.html b/testing/web-platform/tests/referrer-policy/origin/meta-referrer/cross-origin/http-https/iframe-tag/generic.no-redirect.http.html
new file mode 100644
index 000000000..413690e8d
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/origin/meta-referrer/cross-origin/http-https/iframe-tag/generic.no-redirect.http.html
@@ -0,0 +1,41 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by referrer-policy/generic/tools/generate.py using referrer-policy/generic/template/test.release.html.template. -->
+<html>
+ <head>
+ <title>Referrer-Policy: Referrer Policy is set to 'origin'</title>
+ <meta name="description" content="Check that all subresources in all casses get only the origin portion of the referrer URL.">
+ <meta name="referrer" content="origin">
+ <link rel="author" title="Kristijan Burnik" href="burnik@chromium.org">
+ <link rel="help" href="https://w3c.github.io/webappsec-referrer-policy/#referrer-policy-origin">
+ <meta name="assert" content="The referrer URL is origin when a
+ document served over http requires an https
+ sub-resource via iframe-tag using the meta-referrer
+ delivery method with no-redirect and when
+ the target request is cross-origin.">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <!-- TODO(kristijanburnik): Minify and merge both: -->
+ <script src="/referrer-policy/generic/common.js"></script>
+ <script src="/referrer-policy/generic/referrer-policy-test-case.js?pipe=sub"></script>
+ </head>
+ <body>
+ <script>
+ ReferrerPolicyTestCase(
+ {
+ "referrer_policy": "origin",
+ "delivery_method": "meta-referrer",
+ "redirection": "no-redirect",
+ "origin": "cross-origin",
+ "source_protocol": "http",
+ "target_protocol": "https",
+ "subresource": "iframe-tag",
+ "subresource_path": "/referrer-policy/generic/subresource/document.py",
+ "referrer_url": "origin"
+ },
+ document.querySelector("meta[name=assert]").content,
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/origin/meta-referrer/cross-origin/http-https/iframe-tag/generic.swap-origin-redirect.http.html b/testing/web-platform/tests/referrer-policy/origin/meta-referrer/cross-origin/http-https/iframe-tag/generic.swap-origin-redirect.http.html
new file mode 100644
index 000000000..602ec76bd
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/origin/meta-referrer/cross-origin/http-https/iframe-tag/generic.swap-origin-redirect.http.html
@@ -0,0 +1,41 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by referrer-policy/generic/tools/generate.py using referrer-policy/generic/template/test.release.html.template. -->
+<html>
+ <head>
+ <title>Referrer-Policy: Referrer Policy is set to 'origin'</title>
+ <meta name="description" content="Check that all subresources in all casses get only the origin portion of the referrer URL.">
+ <meta name="referrer" content="origin">
+ <link rel="author" title="Kristijan Burnik" href="burnik@chromium.org">
+ <link rel="help" href="https://w3c.github.io/webappsec-referrer-policy/#referrer-policy-origin">
+ <meta name="assert" content="The referrer URL is origin when a
+ document served over http requires an https
+ sub-resource via iframe-tag using the meta-referrer
+ delivery method with swap-origin-redirect and when
+ the target request is cross-origin.">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <!-- TODO(kristijanburnik): Minify and merge both: -->
+ <script src="/referrer-policy/generic/common.js"></script>
+ <script src="/referrer-policy/generic/referrer-policy-test-case.js?pipe=sub"></script>
+ </head>
+ <body>
+ <script>
+ ReferrerPolicyTestCase(
+ {
+ "referrer_policy": "origin",
+ "delivery_method": "meta-referrer",
+ "redirection": "swap-origin-redirect",
+ "origin": "cross-origin",
+ "source_protocol": "http",
+ "target_protocol": "https",
+ "subresource": "iframe-tag",
+ "subresource_path": "/referrer-policy/generic/subresource/document.py",
+ "referrer_url": "origin"
+ },
+ document.querySelector("meta[name=assert]").content,
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/origin/meta-referrer/cross-origin/http-https/img-tag/generic.keep-origin-redirect.http.html b/testing/web-platform/tests/referrer-policy/origin/meta-referrer/cross-origin/http-https/img-tag/generic.keep-origin-redirect.http.html
new file mode 100644
index 000000000..1a987e7f5
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/origin/meta-referrer/cross-origin/http-https/img-tag/generic.keep-origin-redirect.http.html
@@ -0,0 +1,41 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by referrer-policy/generic/tools/generate.py using referrer-policy/generic/template/test.release.html.template. -->
+<html>
+ <head>
+ <title>Referrer-Policy: Referrer Policy is set to 'origin'</title>
+ <meta name="description" content="Check that all subresources in all casses get only the origin portion of the referrer URL.">
+ <meta name="referrer" content="origin">
+ <link rel="author" title="Kristijan Burnik" href="burnik@chromium.org">
+ <link rel="help" href="https://w3c.github.io/webappsec-referrer-policy/#referrer-policy-origin">
+ <meta name="assert" content="The referrer URL is origin when a
+ document served over http requires an https
+ sub-resource via img-tag using the meta-referrer
+ delivery method with keep-origin-redirect and when
+ the target request is cross-origin.">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <!-- TODO(kristijanburnik): Minify and merge both: -->
+ <script src="/referrer-policy/generic/common.js"></script>
+ <script src="/referrer-policy/generic/referrer-policy-test-case.js?pipe=sub"></script>
+ </head>
+ <body>
+ <script>
+ ReferrerPolicyTestCase(
+ {
+ "referrer_policy": "origin",
+ "delivery_method": "meta-referrer",
+ "redirection": "keep-origin-redirect",
+ "origin": "cross-origin",
+ "source_protocol": "http",
+ "target_protocol": "https",
+ "subresource": "img-tag",
+ "subresource_path": "/referrer-policy/generic/subresource/image.py",
+ "referrer_url": "origin"
+ },
+ document.querySelector("meta[name=assert]").content,
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/origin/meta-referrer/cross-origin/http-https/img-tag/generic.no-redirect.http.html b/testing/web-platform/tests/referrer-policy/origin/meta-referrer/cross-origin/http-https/img-tag/generic.no-redirect.http.html
new file mode 100644
index 000000000..b7d113508
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/origin/meta-referrer/cross-origin/http-https/img-tag/generic.no-redirect.http.html
@@ -0,0 +1,41 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by referrer-policy/generic/tools/generate.py using referrer-policy/generic/template/test.release.html.template. -->
+<html>
+ <head>
+ <title>Referrer-Policy: Referrer Policy is set to 'origin'</title>
+ <meta name="description" content="Check that all subresources in all casses get only the origin portion of the referrer URL.">
+ <meta name="referrer" content="origin">
+ <link rel="author" title="Kristijan Burnik" href="burnik@chromium.org">
+ <link rel="help" href="https://w3c.github.io/webappsec-referrer-policy/#referrer-policy-origin">
+ <meta name="assert" content="The referrer URL is origin when a
+ document served over http requires an https
+ sub-resource via img-tag using the meta-referrer
+ delivery method with no-redirect and when
+ the target request is cross-origin.">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <!-- TODO(kristijanburnik): Minify and merge both: -->
+ <script src="/referrer-policy/generic/common.js"></script>
+ <script src="/referrer-policy/generic/referrer-policy-test-case.js?pipe=sub"></script>
+ </head>
+ <body>
+ <script>
+ ReferrerPolicyTestCase(
+ {
+ "referrer_policy": "origin",
+ "delivery_method": "meta-referrer",
+ "redirection": "no-redirect",
+ "origin": "cross-origin",
+ "source_protocol": "http",
+ "target_protocol": "https",
+ "subresource": "img-tag",
+ "subresource_path": "/referrer-policy/generic/subresource/image.py",
+ "referrer_url": "origin"
+ },
+ document.querySelector("meta[name=assert]").content,
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/origin/meta-referrer/cross-origin/http-https/img-tag/generic.swap-origin-redirect.http.html b/testing/web-platform/tests/referrer-policy/origin/meta-referrer/cross-origin/http-https/img-tag/generic.swap-origin-redirect.http.html
new file mode 100644
index 000000000..312c8d556
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/origin/meta-referrer/cross-origin/http-https/img-tag/generic.swap-origin-redirect.http.html
@@ -0,0 +1,41 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by referrer-policy/generic/tools/generate.py using referrer-policy/generic/template/test.release.html.template. -->
+<html>
+ <head>
+ <title>Referrer-Policy: Referrer Policy is set to 'origin'</title>
+ <meta name="description" content="Check that all subresources in all casses get only the origin portion of the referrer URL.">
+ <meta name="referrer" content="origin">
+ <link rel="author" title="Kristijan Burnik" href="burnik@chromium.org">
+ <link rel="help" href="https://w3c.github.io/webappsec-referrer-policy/#referrer-policy-origin">
+ <meta name="assert" content="The referrer URL is origin when a
+ document served over http requires an https
+ sub-resource via img-tag using the meta-referrer
+ delivery method with swap-origin-redirect and when
+ the target request is cross-origin.">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <!-- TODO(kristijanburnik): Minify and merge both: -->
+ <script src="/referrer-policy/generic/common.js"></script>
+ <script src="/referrer-policy/generic/referrer-policy-test-case.js?pipe=sub"></script>
+ </head>
+ <body>
+ <script>
+ ReferrerPolicyTestCase(
+ {
+ "referrer_policy": "origin",
+ "delivery_method": "meta-referrer",
+ "redirection": "swap-origin-redirect",
+ "origin": "cross-origin",
+ "source_protocol": "http",
+ "target_protocol": "https",
+ "subresource": "img-tag",
+ "subresource_path": "/referrer-policy/generic/subresource/image.py",
+ "referrer_url": "origin"
+ },
+ document.querySelector("meta[name=assert]").content,
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/origin/meta-referrer/cross-origin/http-https/script-tag/generic.keep-origin-redirect.http.html b/testing/web-platform/tests/referrer-policy/origin/meta-referrer/cross-origin/http-https/script-tag/generic.keep-origin-redirect.http.html
new file mode 100644
index 000000000..ba9d5d08f
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/origin/meta-referrer/cross-origin/http-https/script-tag/generic.keep-origin-redirect.http.html
@@ -0,0 +1,41 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by referrer-policy/generic/tools/generate.py using referrer-policy/generic/template/test.release.html.template. -->
+<html>
+ <head>
+ <title>Referrer-Policy: Referrer Policy is set to 'origin'</title>
+ <meta name="description" content="Check that all subresources in all casses get only the origin portion of the referrer URL.">
+ <meta name="referrer" content="origin">
+ <link rel="author" title="Kristijan Burnik" href="burnik@chromium.org">
+ <link rel="help" href="https://w3c.github.io/webappsec-referrer-policy/#referrer-policy-origin">
+ <meta name="assert" content="The referrer URL is origin when a
+ document served over http requires an https
+ sub-resource via script-tag using the meta-referrer
+ delivery method with keep-origin-redirect and when
+ the target request is cross-origin.">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <!-- TODO(kristijanburnik): Minify and merge both: -->
+ <script src="/referrer-policy/generic/common.js"></script>
+ <script src="/referrer-policy/generic/referrer-policy-test-case.js?pipe=sub"></script>
+ </head>
+ <body>
+ <script>
+ ReferrerPolicyTestCase(
+ {
+ "referrer_policy": "origin",
+ "delivery_method": "meta-referrer",
+ "redirection": "keep-origin-redirect",
+ "origin": "cross-origin",
+ "source_protocol": "http",
+ "target_protocol": "https",
+ "subresource": "script-tag",
+ "subresource_path": "/referrer-policy/generic/subresource/script.py",
+ "referrer_url": "origin"
+ },
+ document.querySelector("meta[name=assert]").content,
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/origin/meta-referrer/cross-origin/http-https/script-tag/generic.no-redirect.http.html b/testing/web-platform/tests/referrer-policy/origin/meta-referrer/cross-origin/http-https/script-tag/generic.no-redirect.http.html
new file mode 100644
index 000000000..93a164d27
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/origin/meta-referrer/cross-origin/http-https/script-tag/generic.no-redirect.http.html
@@ -0,0 +1,41 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by referrer-policy/generic/tools/generate.py using referrer-policy/generic/template/test.release.html.template. -->
+<html>
+ <head>
+ <title>Referrer-Policy: Referrer Policy is set to 'origin'</title>
+ <meta name="description" content="Check that all subresources in all casses get only the origin portion of the referrer URL.">
+ <meta name="referrer" content="origin">
+ <link rel="author" title="Kristijan Burnik" href="burnik@chromium.org">
+ <link rel="help" href="https://w3c.github.io/webappsec-referrer-policy/#referrer-policy-origin">
+ <meta name="assert" content="The referrer URL is origin when a
+ document served over http requires an https
+ sub-resource via script-tag using the meta-referrer
+ delivery method with no-redirect and when
+ the target request is cross-origin.">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <!-- TODO(kristijanburnik): Minify and merge both: -->
+ <script src="/referrer-policy/generic/common.js"></script>
+ <script src="/referrer-policy/generic/referrer-policy-test-case.js?pipe=sub"></script>
+ </head>
+ <body>
+ <script>
+ ReferrerPolicyTestCase(
+ {
+ "referrer_policy": "origin",
+ "delivery_method": "meta-referrer",
+ "redirection": "no-redirect",
+ "origin": "cross-origin",
+ "source_protocol": "http",
+ "target_protocol": "https",
+ "subresource": "script-tag",
+ "subresource_path": "/referrer-policy/generic/subresource/script.py",
+ "referrer_url": "origin"
+ },
+ document.querySelector("meta[name=assert]").content,
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/origin/meta-referrer/cross-origin/http-https/script-tag/generic.swap-origin-redirect.http.html b/testing/web-platform/tests/referrer-policy/origin/meta-referrer/cross-origin/http-https/script-tag/generic.swap-origin-redirect.http.html
new file mode 100644
index 000000000..9b8f447e5
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/origin/meta-referrer/cross-origin/http-https/script-tag/generic.swap-origin-redirect.http.html
@@ -0,0 +1,41 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by referrer-policy/generic/tools/generate.py using referrer-policy/generic/template/test.release.html.template. -->
+<html>
+ <head>
+ <title>Referrer-Policy: Referrer Policy is set to 'origin'</title>
+ <meta name="description" content="Check that all subresources in all casses get only the origin portion of the referrer URL.">
+ <meta name="referrer" content="origin">
+ <link rel="author" title="Kristijan Burnik" href="burnik@chromium.org">
+ <link rel="help" href="https://w3c.github.io/webappsec-referrer-policy/#referrer-policy-origin">
+ <meta name="assert" content="The referrer URL is origin when a
+ document served over http requires an https
+ sub-resource via script-tag using the meta-referrer
+ delivery method with swap-origin-redirect and when
+ the target request is cross-origin.">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <!-- TODO(kristijanburnik): Minify and merge both: -->
+ <script src="/referrer-policy/generic/common.js"></script>
+ <script src="/referrer-policy/generic/referrer-policy-test-case.js?pipe=sub"></script>
+ </head>
+ <body>
+ <script>
+ ReferrerPolicyTestCase(
+ {
+ "referrer_policy": "origin",
+ "delivery_method": "meta-referrer",
+ "redirection": "swap-origin-redirect",
+ "origin": "cross-origin",
+ "source_protocol": "http",
+ "target_protocol": "https",
+ "subresource": "script-tag",
+ "subresource_path": "/referrer-policy/generic/subresource/script.py",
+ "referrer_url": "origin"
+ },
+ document.querySelector("meta[name=assert]").content,
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/origin/meta-referrer/cross-origin/http-https/xhr-request/generic.keep-origin-redirect.http.html b/testing/web-platform/tests/referrer-policy/origin/meta-referrer/cross-origin/http-https/xhr-request/generic.keep-origin-redirect.http.html
new file mode 100644
index 000000000..8b1a8ea3d
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/origin/meta-referrer/cross-origin/http-https/xhr-request/generic.keep-origin-redirect.http.html
@@ -0,0 +1,41 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by referrer-policy/generic/tools/generate.py using referrer-policy/generic/template/test.release.html.template. -->
+<html>
+ <head>
+ <title>Referrer-Policy: Referrer Policy is set to 'origin'</title>
+ <meta name="description" content="Check that all subresources in all casses get only the origin portion of the referrer URL.">
+ <meta name="referrer" content="origin">
+ <link rel="author" title="Kristijan Burnik" href="burnik@chromium.org">
+ <link rel="help" href="https://w3c.github.io/webappsec-referrer-policy/#referrer-policy-origin">
+ <meta name="assert" content="The referrer URL is origin when a
+ document served over http requires an https
+ sub-resource via xhr-request using the meta-referrer
+ delivery method with keep-origin-redirect and when
+ the target request is cross-origin.">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <!-- TODO(kristijanburnik): Minify and merge both: -->
+ <script src="/referrer-policy/generic/common.js"></script>
+ <script src="/referrer-policy/generic/referrer-policy-test-case.js?pipe=sub"></script>
+ </head>
+ <body>
+ <script>
+ ReferrerPolicyTestCase(
+ {
+ "referrer_policy": "origin",
+ "delivery_method": "meta-referrer",
+ "redirection": "keep-origin-redirect",
+ "origin": "cross-origin",
+ "source_protocol": "http",
+ "target_protocol": "https",
+ "subresource": "xhr-request",
+ "subresource_path": "/referrer-policy/generic/subresource/xhr.py",
+ "referrer_url": "origin"
+ },
+ document.querySelector("meta[name=assert]").content,
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/origin/meta-referrer/cross-origin/http-https/xhr-request/generic.no-redirect.http.html b/testing/web-platform/tests/referrer-policy/origin/meta-referrer/cross-origin/http-https/xhr-request/generic.no-redirect.http.html
new file mode 100644
index 000000000..d40d7b411
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/origin/meta-referrer/cross-origin/http-https/xhr-request/generic.no-redirect.http.html
@@ -0,0 +1,41 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by referrer-policy/generic/tools/generate.py using referrer-policy/generic/template/test.release.html.template. -->
+<html>
+ <head>
+ <title>Referrer-Policy: Referrer Policy is set to 'origin'</title>
+ <meta name="description" content="Check that all subresources in all casses get only the origin portion of the referrer URL.">
+ <meta name="referrer" content="origin">
+ <link rel="author" title="Kristijan Burnik" href="burnik@chromium.org">
+ <link rel="help" href="https://w3c.github.io/webappsec-referrer-policy/#referrer-policy-origin">
+ <meta name="assert" content="The referrer URL is origin when a
+ document served over http requires an https
+ sub-resource via xhr-request using the meta-referrer
+ delivery method with no-redirect and when
+ the target request is cross-origin.">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <!-- TODO(kristijanburnik): Minify and merge both: -->
+ <script src="/referrer-policy/generic/common.js"></script>
+ <script src="/referrer-policy/generic/referrer-policy-test-case.js?pipe=sub"></script>
+ </head>
+ <body>
+ <script>
+ ReferrerPolicyTestCase(
+ {
+ "referrer_policy": "origin",
+ "delivery_method": "meta-referrer",
+ "redirection": "no-redirect",
+ "origin": "cross-origin",
+ "source_protocol": "http",
+ "target_protocol": "https",
+ "subresource": "xhr-request",
+ "subresource_path": "/referrer-policy/generic/subresource/xhr.py",
+ "referrer_url": "origin"
+ },
+ document.querySelector("meta[name=assert]").content,
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/origin/meta-referrer/cross-origin/http-https/xhr-request/generic.swap-origin-redirect.http.html b/testing/web-platform/tests/referrer-policy/origin/meta-referrer/cross-origin/http-https/xhr-request/generic.swap-origin-redirect.http.html
new file mode 100644
index 000000000..65bc46987
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/origin/meta-referrer/cross-origin/http-https/xhr-request/generic.swap-origin-redirect.http.html
@@ -0,0 +1,41 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by referrer-policy/generic/tools/generate.py using referrer-policy/generic/template/test.release.html.template. -->
+<html>
+ <head>
+ <title>Referrer-Policy: Referrer Policy is set to 'origin'</title>
+ <meta name="description" content="Check that all subresources in all casses get only the origin portion of the referrer URL.">
+ <meta name="referrer" content="origin">
+ <link rel="author" title="Kristijan Burnik" href="burnik@chromium.org">
+ <link rel="help" href="https://w3c.github.io/webappsec-referrer-policy/#referrer-policy-origin">
+ <meta name="assert" content="The referrer URL is origin when a
+ document served over http requires an https
+ sub-resource via xhr-request using the meta-referrer
+ delivery method with swap-origin-redirect and when
+ the target request is cross-origin.">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <!-- TODO(kristijanburnik): Minify and merge both: -->
+ <script src="/referrer-policy/generic/common.js"></script>
+ <script src="/referrer-policy/generic/referrer-policy-test-case.js?pipe=sub"></script>
+ </head>
+ <body>
+ <script>
+ ReferrerPolicyTestCase(
+ {
+ "referrer_policy": "origin",
+ "delivery_method": "meta-referrer",
+ "redirection": "swap-origin-redirect",
+ "origin": "cross-origin",
+ "source_protocol": "http",
+ "target_protocol": "https",
+ "subresource": "xhr-request",
+ "subresource_path": "/referrer-policy/generic/subresource/xhr.py",
+ "referrer_url": "origin"
+ },
+ document.querySelector("meta[name=assert]").content,
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/origin/meta-referrer/same-origin/http-http/fetch-request/generic.keep-origin-redirect.http.html b/testing/web-platform/tests/referrer-policy/origin/meta-referrer/same-origin/http-http/fetch-request/generic.keep-origin-redirect.http.html
new file mode 100644
index 000000000..cba7210bd
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/origin/meta-referrer/same-origin/http-http/fetch-request/generic.keep-origin-redirect.http.html
@@ -0,0 +1,41 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by referrer-policy/generic/tools/generate.py using referrer-policy/generic/template/test.release.html.template. -->
+<html>
+ <head>
+ <title>Referrer-Policy: Referrer Policy is set to 'origin'</title>
+ <meta name="description" content="Check that all subresources in all casses get only the origin portion of the referrer URL.">
+ <meta name="referrer" content="origin">
+ <link rel="author" title="Kristijan Burnik" href="burnik@chromium.org">
+ <link rel="help" href="https://w3c.github.io/webappsec-referrer-policy/#referrer-policy-origin">
+ <meta name="assert" content="The referrer URL is origin when a
+ document served over http requires an http
+ sub-resource via fetch-request using the meta-referrer
+ delivery method with keep-origin-redirect and when
+ the target request is same-origin.">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <!-- TODO(kristijanburnik): Minify and merge both: -->
+ <script src="/referrer-policy/generic/common.js"></script>
+ <script src="/referrer-policy/generic/referrer-policy-test-case.js?pipe=sub"></script>
+ </head>
+ <body>
+ <script>
+ ReferrerPolicyTestCase(
+ {
+ "referrer_policy": "origin",
+ "delivery_method": "meta-referrer",
+ "redirection": "keep-origin-redirect",
+ "origin": "same-origin",
+ "source_protocol": "http",
+ "target_protocol": "http",
+ "subresource": "fetch-request",
+ "subresource_path": "/referrer-policy/generic/subresource/xhr.py",
+ "referrer_url": "origin"
+ },
+ document.querySelector("meta[name=assert]").content,
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/origin/meta-referrer/same-origin/http-http/fetch-request/generic.no-redirect.http.html b/testing/web-platform/tests/referrer-policy/origin/meta-referrer/same-origin/http-http/fetch-request/generic.no-redirect.http.html
new file mode 100644
index 000000000..54122bd8d
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/origin/meta-referrer/same-origin/http-http/fetch-request/generic.no-redirect.http.html
@@ -0,0 +1,41 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by referrer-policy/generic/tools/generate.py using referrer-policy/generic/template/test.release.html.template. -->
+<html>
+ <head>
+ <title>Referrer-Policy: Referrer Policy is set to 'origin'</title>
+ <meta name="description" content="Check that all subresources in all casses get only the origin portion of the referrer URL.">
+ <meta name="referrer" content="origin">
+ <link rel="author" title="Kristijan Burnik" href="burnik@chromium.org">
+ <link rel="help" href="https://w3c.github.io/webappsec-referrer-policy/#referrer-policy-origin">
+ <meta name="assert" content="The referrer URL is origin when a
+ document served over http requires an http
+ sub-resource via fetch-request using the meta-referrer
+ delivery method with no-redirect and when
+ the target request is same-origin.">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <!-- TODO(kristijanburnik): Minify and merge both: -->
+ <script src="/referrer-policy/generic/common.js"></script>
+ <script src="/referrer-policy/generic/referrer-policy-test-case.js?pipe=sub"></script>
+ </head>
+ <body>
+ <script>
+ ReferrerPolicyTestCase(
+ {
+ "referrer_policy": "origin",
+ "delivery_method": "meta-referrer",
+ "redirection": "no-redirect",
+ "origin": "same-origin",
+ "source_protocol": "http",
+ "target_protocol": "http",
+ "subresource": "fetch-request",
+ "subresource_path": "/referrer-policy/generic/subresource/xhr.py",
+ "referrer_url": "origin"
+ },
+ document.querySelector("meta[name=assert]").content,
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/origin/meta-referrer/same-origin/http-http/fetch-request/generic.swap-origin-redirect.http.html b/testing/web-platform/tests/referrer-policy/origin/meta-referrer/same-origin/http-http/fetch-request/generic.swap-origin-redirect.http.html
new file mode 100644
index 000000000..a83eed311
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/origin/meta-referrer/same-origin/http-http/fetch-request/generic.swap-origin-redirect.http.html
@@ -0,0 +1,41 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by referrer-policy/generic/tools/generate.py using referrer-policy/generic/template/test.release.html.template. -->
+<html>
+ <head>
+ <title>Referrer-Policy: Referrer Policy is set to 'origin'</title>
+ <meta name="description" content="Check that all subresources in all casses get only the origin portion of the referrer URL.">
+ <meta name="referrer" content="origin">
+ <link rel="author" title="Kristijan Burnik" href="burnik@chromium.org">
+ <link rel="help" href="https://w3c.github.io/webappsec-referrer-policy/#referrer-policy-origin">
+ <meta name="assert" content="The referrer URL is origin when a
+ document served over http requires an http
+ sub-resource via fetch-request using the meta-referrer
+ delivery method with swap-origin-redirect and when
+ the target request is same-origin.">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <!-- TODO(kristijanburnik): Minify and merge both: -->
+ <script src="/referrer-policy/generic/common.js"></script>
+ <script src="/referrer-policy/generic/referrer-policy-test-case.js?pipe=sub"></script>
+ </head>
+ <body>
+ <script>
+ ReferrerPolicyTestCase(
+ {
+ "referrer_policy": "origin",
+ "delivery_method": "meta-referrer",
+ "redirection": "swap-origin-redirect",
+ "origin": "same-origin",
+ "source_protocol": "http",
+ "target_protocol": "http",
+ "subresource": "fetch-request",
+ "subresource_path": "/referrer-policy/generic/subresource/xhr.py",
+ "referrer_url": "origin"
+ },
+ document.querySelector("meta[name=assert]").content,
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/origin/meta-referrer/same-origin/http-http/iframe-tag/generic.keep-origin-redirect.http.html b/testing/web-platform/tests/referrer-policy/origin/meta-referrer/same-origin/http-http/iframe-tag/generic.keep-origin-redirect.http.html
new file mode 100644
index 000000000..493f79902
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/origin/meta-referrer/same-origin/http-http/iframe-tag/generic.keep-origin-redirect.http.html
@@ -0,0 +1,41 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by referrer-policy/generic/tools/generate.py using referrer-policy/generic/template/test.release.html.template. -->
+<html>
+ <head>
+ <title>Referrer-Policy: Referrer Policy is set to 'origin'</title>
+ <meta name="description" content="Check that all subresources in all casses get only the origin portion of the referrer URL.">
+ <meta name="referrer" content="origin">
+ <link rel="author" title="Kristijan Burnik" href="burnik@chromium.org">
+ <link rel="help" href="https://w3c.github.io/webappsec-referrer-policy/#referrer-policy-origin">
+ <meta name="assert" content="The referrer URL is origin when a
+ document served over http requires an http
+ sub-resource via iframe-tag using the meta-referrer
+ delivery method with keep-origin-redirect and when
+ the target request is same-origin.">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <!-- TODO(kristijanburnik): Minify and merge both: -->
+ <script src="/referrer-policy/generic/common.js"></script>
+ <script src="/referrer-policy/generic/referrer-policy-test-case.js?pipe=sub"></script>
+ </head>
+ <body>
+ <script>
+ ReferrerPolicyTestCase(
+ {
+ "referrer_policy": "origin",
+ "delivery_method": "meta-referrer",
+ "redirection": "keep-origin-redirect",
+ "origin": "same-origin",
+ "source_protocol": "http",
+ "target_protocol": "http",
+ "subresource": "iframe-tag",
+ "subresource_path": "/referrer-policy/generic/subresource/document.py",
+ "referrer_url": "origin"
+ },
+ document.querySelector("meta[name=assert]").content,
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/origin/meta-referrer/same-origin/http-http/iframe-tag/generic.no-redirect.http.html b/testing/web-platform/tests/referrer-policy/origin/meta-referrer/same-origin/http-http/iframe-tag/generic.no-redirect.http.html
new file mode 100644
index 000000000..4aaae188f
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/origin/meta-referrer/same-origin/http-http/iframe-tag/generic.no-redirect.http.html
@@ -0,0 +1,41 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by referrer-policy/generic/tools/generate.py using referrer-policy/generic/template/test.release.html.template. -->
+<html>
+ <head>
+ <title>Referrer-Policy: Referrer Policy is set to 'origin'</title>
+ <meta name="description" content="Check that all subresources in all casses get only the origin portion of the referrer URL.">
+ <meta name="referrer" content="origin">
+ <link rel="author" title="Kristijan Burnik" href="burnik@chromium.org">
+ <link rel="help" href="https://w3c.github.io/webappsec-referrer-policy/#referrer-policy-origin">
+ <meta name="assert" content="The referrer URL is origin when a
+ document served over http requires an http
+ sub-resource via iframe-tag using the meta-referrer
+ delivery method with no-redirect and when
+ the target request is same-origin.">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <!-- TODO(kristijanburnik): Minify and merge both: -->
+ <script src="/referrer-policy/generic/common.js"></script>
+ <script src="/referrer-policy/generic/referrer-policy-test-case.js?pipe=sub"></script>
+ </head>
+ <body>
+ <script>
+ ReferrerPolicyTestCase(
+ {
+ "referrer_policy": "origin",
+ "delivery_method": "meta-referrer",
+ "redirection": "no-redirect",
+ "origin": "same-origin",
+ "source_protocol": "http",
+ "target_protocol": "http",
+ "subresource": "iframe-tag",
+ "subresource_path": "/referrer-policy/generic/subresource/document.py",
+ "referrer_url": "origin"
+ },
+ document.querySelector("meta[name=assert]").content,
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/origin/meta-referrer/same-origin/http-http/iframe-tag/generic.swap-origin-redirect.http.html b/testing/web-platform/tests/referrer-policy/origin/meta-referrer/same-origin/http-http/iframe-tag/generic.swap-origin-redirect.http.html
new file mode 100644
index 000000000..acf0c7aa0
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/origin/meta-referrer/same-origin/http-http/iframe-tag/generic.swap-origin-redirect.http.html
@@ -0,0 +1,41 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by referrer-policy/generic/tools/generate.py using referrer-policy/generic/template/test.release.html.template. -->
+<html>
+ <head>
+ <title>Referrer-Policy: Referrer Policy is set to 'origin'</title>
+ <meta name="description" content="Check that all subresources in all casses get only the origin portion of the referrer URL.">
+ <meta name="referrer" content="origin">
+ <link rel="author" title="Kristijan Burnik" href="burnik@chromium.org">
+ <link rel="help" href="https://w3c.github.io/webappsec-referrer-policy/#referrer-policy-origin">
+ <meta name="assert" content="The referrer URL is origin when a
+ document served over http requires an http
+ sub-resource via iframe-tag using the meta-referrer
+ delivery method with swap-origin-redirect and when
+ the target request is same-origin.">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <!-- TODO(kristijanburnik): Minify and merge both: -->
+ <script src="/referrer-policy/generic/common.js"></script>
+ <script src="/referrer-policy/generic/referrer-policy-test-case.js?pipe=sub"></script>
+ </head>
+ <body>
+ <script>
+ ReferrerPolicyTestCase(
+ {
+ "referrer_policy": "origin",
+ "delivery_method": "meta-referrer",
+ "redirection": "swap-origin-redirect",
+ "origin": "same-origin",
+ "source_protocol": "http",
+ "target_protocol": "http",
+ "subresource": "iframe-tag",
+ "subresource_path": "/referrer-policy/generic/subresource/document.py",
+ "referrer_url": "origin"
+ },
+ document.querySelector("meta[name=assert]").content,
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/origin/meta-referrer/same-origin/http-http/img-tag/generic.keep-origin-redirect.http.html b/testing/web-platform/tests/referrer-policy/origin/meta-referrer/same-origin/http-http/img-tag/generic.keep-origin-redirect.http.html
new file mode 100644
index 000000000..99da41e73
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/origin/meta-referrer/same-origin/http-http/img-tag/generic.keep-origin-redirect.http.html
@@ -0,0 +1,41 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by referrer-policy/generic/tools/generate.py using referrer-policy/generic/template/test.release.html.template. -->
+<html>
+ <head>
+ <title>Referrer-Policy: Referrer Policy is set to 'origin'</title>
+ <meta name="description" content="Check that all subresources in all casses get only the origin portion of the referrer URL.">
+ <meta name="referrer" content="origin">
+ <link rel="author" title="Kristijan Burnik" href="burnik@chromium.org">
+ <link rel="help" href="https://w3c.github.io/webappsec-referrer-policy/#referrer-policy-origin">
+ <meta name="assert" content="The referrer URL is origin when a
+ document served over http requires an http
+ sub-resource via img-tag using the meta-referrer
+ delivery method with keep-origin-redirect and when
+ the target request is same-origin.">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <!-- TODO(kristijanburnik): Minify and merge both: -->
+ <script src="/referrer-policy/generic/common.js"></script>
+ <script src="/referrer-policy/generic/referrer-policy-test-case.js?pipe=sub"></script>
+ </head>
+ <body>
+ <script>
+ ReferrerPolicyTestCase(
+ {
+ "referrer_policy": "origin",
+ "delivery_method": "meta-referrer",
+ "redirection": "keep-origin-redirect",
+ "origin": "same-origin",
+ "source_protocol": "http",
+ "target_protocol": "http",
+ "subresource": "img-tag",
+ "subresource_path": "/referrer-policy/generic/subresource/image.py",
+ "referrer_url": "origin"
+ },
+ document.querySelector("meta[name=assert]").content,
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/origin/meta-referrer/same-origin/http-http/img-tag/generic.no-redirect.http.html b/testing/web-platform/tests/referrer-policy/origin/meta-referrer/same-origin/http-http/img-tag/generic.no-redirect.http.html
new file mode 100644
index 000000000..756dfb3cd
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/origin/meta-referrer/same-origin/http-http/img-tag/generic.no-redirect.http.html
@@ -0,0 +1,41 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by referrer-policy/generic/tools/generate.py using referrer-policy/generic/template/test.release.html.template. -->
+<html>
+ <head>
+ <title>Referrer-Policy: Referrer Policy is set to 'origin'</title>
+ <meta name="description" content="Check that all subresources in all casses get only the origin portion of the referrer URL.">
+ <meta name="referrer" content="origin">
+ <link rel="author" title="Kristijan Burnik" href="burnik@chromium.org">
+ <link rel="help" href="https://w3c.github.io/webappsec-referrer-policy/#referrer-policy-origin">
+ <meta name="assert" content="The referrer URL is origin when a
+ document served over http requires an http
+ sub-resource via img-tag using the meta-referrer
+ delivery method with no-redirect and when
+ the target request is same-origin.">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <!-- TODO(kristijanburnik): Minify and merge both: -->
+ <script src="/referrer-policy/generic/common.js"></script>
+ <script src="/referrer-policy/generic/referrer-policy-test-case.js?pipe=sub"></script>
+ </head>
+ <body>
+ <script>
+ ReferrerPolicyTestCase(
+ {
+ "referrer_policy": "origin",
+ "delivery_method": "meta-referrer",
+ "redirection": "no-redirect",
+ "origin": "same-origin",
+ "source_protocol": "http",
+ "target_protocol": "http",
+ "subresource": "img-tag",
+ "subresource_path": "/referrer-policy/generic/subresource/image.py",
+ "referrer_url": "origin"
+ },
+ document.querySelector("meta[name=assert]").content,
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/origin/meta-referrer/same-origin/http-http/img-tag/generic.swap-origin-redirect.http.html b/testing/web-platform/tests/referrer-policy/origin/meta-referrer/same-origin/http-http/img-tag/generic.swap-origin-redirect.http.html
new file mode 100644
index 000000000..65ed223f1
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/origin/meta-referrer/same-origin/http-http/img-tag/generic.swap-origin-redirect.http.html
@@ -0,0 +1,41 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by referrer-policy/generic/tools/generate.py using referrer-policy/generic/template/test.release.html.template. -->
+<html>
+ <head>
+ <title>Referrer-Policy: Referrer Policy is set to 'origin'</title>
+ <meta name="description" content="Check that all subresources in all casses get only the origin portion of the referrer URL.">
+ <meta name="referrer" content="origin">
+ <link rel="author" title="Kristijan Burnik" href="burnik@chromium.org">
+ <link rel="help" href="https://w3c.github.io/webappsec-referrer-policy/#referrer-policy-origin">
+ <meta name="assert" content="The referrer URL is origin when a
+ document served over http requires an http
+ sub-resource via img-tag using the meta-referrer
+ delivery method with swap-origin-redirect and when
+ the target request is same-origin.">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <!-- TODO(kristijanburnik): Minify and merge both: -->
+ <script src="/referrer-policy/generic/common.js"></script>
+ <script src="/referrer-policy/generic/referrer-policy-test-case.js?pipe=sub"></script>
+ </head>
+ <body>
+ <script>
+ ReferrerPolicyTestCase(
+ {
+ "referrer_policy": "origin",
+ "delivery_method": "meta-referrer",
+ "redirection": "swap-origin-redirect",
+ "origin": "same-origin",
+ "source_protocol": "http",
+ "target_protocol": "http",
+ "subresource": "img-tag",
+ "subresource_path": "/referrer-policy/generic/subresource/image.py",
+ "referrer_url": "origin"
+ },
+ document.querySelector("meta[name=assert]").content,
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/origin/meta-referrer/same-origin/http-http/script-tag/generic.keep-origin-redirect.http.html b/testing/web-platform/tests/referrer-policy/origin/meta-referrer/same-origin/http-http/script-tag/generic.keep-origin-redirect.http.html
new file mode 100644
index 000000000..96e7d4e7b
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/origin/meta-referrer/same-origin/http-http/script-tag/generic.keep-origin-redirect.http.html
@@ -0,0 +1,41 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by referrer-policy/generic/tools/generate.py using referrer-policy/generic/template/test.release.html.template. -->
+<html>
+ <head>
+ <title>Referrer-Policy: Referrer Policy is set to 'origin'</title>
+ <meta name="description" content="Check that all subresources in all casses get only the origin portion of the referrer URL.">
+ <meta name="referrer" content="origin">
+ <link rel="author" title="Kristijan Burnik" href="burnik@chromium.org">
+ <link rel="help" href="https://w3c.github.io/webappsec-referrer-policy/#referrer-policy-origin">
+ <meta name="assert" content="The referrer URL is origin when a
+ document served over http requires an http
+ sub-resource via script-tag using the meta-referrer
+ delivery method with keep-origin-redirect and when
+ the target request is same-origin.">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <!-- TODO(kristijanburnik): Minify and merge both: -->
+ <script src="/referrer-policy/generic/common.js"></script>
+ <script src="/referrer-policy/generic/referrer-policy-test-case.js?pipe=sub"></script>
+ </head>
+ <body>
+ <script>
+ ReferrerPolicyTestCase(
+ {
+ "referrer_policy": "origin",
+ "delivery_method": "meta-referrer",
+ "redirection": "keep-origin-redirect",
+ "origin": "same-origin",
+ "source_protocol": "http",
+ "target_protocol": "http",
+ "subresource": "script-tag",
+ "subresource_path": "/referrer-policy/generic/subresource/script.py",
+ "referrer_url": "origin"
+ },
+ document.querySelector("meta[name=assert]").content,
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/origin/meta-referrer/same-origin/http-http/script-tag/generic.no-redirect.http.html b/testing/web-platform/tests/referrer-policy/origin/meta-referrer/same-origin/http-http/script-tag/generic.no-redirect.http.html
new file mode 100644
index 000000000..d6c28231c
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/origin/meta-referrer/same-origin/http-http/script-tag/generic.no-redirect.http.html
@@ -0,0 +1,41 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by referrer-policy/generic/tools/generate.py using referrer-policy/generic/template/test.release.html.template. -->
+<html>
+ <head>
+ <title>Referrer-Policy: Referrer Policy is set to 'origin'</title>
+ <meta name="description" content="Check that all subresources in all casses get only the origin portion of the referrer URL.">
+ <meta name="referrer" content="origin">
+ <link rel="author" title="Kristijan Burnik" href="burnik@chromium.org">
+ <link rel="help" href="https://w3c.github.io/webappsec-referrer-policy/#referrer-policy-origin">
+ <meta name="assert" content="The referrer URL is origin when a
+ document served over http requires an http
+ sub-resource via script-tag using the meta-referrer
+ delivery method with no-redirect and when
+ the target request is same-origin.">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <!-- TODO(kristijanburnik): Minify and merge both: -->
+ <script src="/referrer-policy/generic/common.js"></script>
+ <script src="/referrer-policy/generic/referrer-policy-test-case.js?pipe=sub"></script>
+ </head>
+ <body>
+ <script>
+ ReferrerPolicyTestCase(
+ {
+ "referrer_policy": "origin",
+ "delivery_method": "meta-referrer",
+ "redirection": "no-redirect",
+ "origin": "same-origin",
+ "source_protocol": "http",
+ "target_protocol": "http",
+ "subresource": "script-tag",
+ "subresource_path": "/referrer-policy/generic/subresource/script.py",
+ "referrer_url": "origin"
+ },
+ document.querySelector("meta[name=assert]").content,
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/origin/meta-referrer/same-origin/http-http/script-tag/generic.swap-origin-redirect.http.html b/testing/web-platform/tests/referrer-policy/origin/meta-referrer/same-origin/http-http/script-tag/generic.swap-origin-redirect.http.html
new file mode 100644
index 000000000..ee9ad9993
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/origin/meta-referrer/same-origin/http-http/script-tag/generic.swap-origin-redirect.http.html
@@ -0,0 +1,41 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by referrer-policy/generic/tools/generate.py using referrer-policy/generic/template/test.release.html.template. -->
+<html>
+ <head>
+ <title>Referrer-Policy: Referrer Policy is set to 'origin'</title>
+ <meta name="description" content="Check that all subresources in all casses get only the origin portion of the referrer URL.">
+ <meta name="referrer" content="origin">
+ <link rel="author" title="Kristijan Burnik" href="burnik@chromium.org">
+ <link rel="help" href="https://w3c.github.io/webappsec-referrer-policy/#referrer-policy-origin">
+ <meta name="assert" content="The referrer URL is origin when a
+ document served over http requires an http
+ sub-resource via script-tag using the meta-referrer
+ delivery method with swap-origin-redirect and when
+ the target request is same-origin.">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <!-- TODO(kristijanburnik): Minify and merge both: -->
+ <script src="/referrer-policy/generic/common.js"></script>
+ <script src="/referrer-policy/generic/referrer-policy-test-case.js?pipe=sub"></script>
+ </head>
+ <body>
+ <script>
+ ReferrerPolicyTestCase(
+ {
+ "referrer_policy": "origin",
+ "delivery_method": "meta-referrer",
+ "redirection": "swap-origin-redirect",
+ "origin": "same-origin",
+ "source_protocol": "http",
+ "target_protocol": "http",
+ "subresource": "script-tag",
+ "subresource_path": "/referrer-policy/generic/subresource/script.py",
+ "referrer_url": "origin"
+ },
+ document.querySelector("meta[name=assert]").content,
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/origin/meta-referrer/same-origin/http-http/xhr-request/generic.keep-origin-redirect.http.html b/testing/web-platform/tests/referrer-policy/origin/meta-referrer/same-origin/http-http/xhr-request/generic.keep-origin-redirect.http.html
new file mode 100644
index 000000000..e33ca1b5f
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/origin/meta-referrer/same-origin/http-http/xhr-request/generic.keep-origin-redirect.http.html
@@ -0,0 +1,41 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by referrer-policy/generic/tools/generate.py using referrer-policy/generic/template/test.release.html.template. -->
+<html>
+ <head>
+ <title>Referrer-Policy: Referrer Policy is set to 'origin'</title>
+ <meta name="description" content="Check that all subresources in all casses get only the origin portion of the referrer URL.">
+ <meta name="referrer" content="origin">
+ <link rel="author" title="Kristijan Burnik" href="burnik@chromium.org">
+ <link rel="help" href="https://w3c.github.io/webappsec-referrer-policy/#referrer-policy-origin">
+ <meta name="assert" content="The referrer URL is origin when a
+ document served over http requires an http
+ sub-resource via xhr-request using the meta-referrer
+ delivery method with keep-origin-redirect and when
+ the target request is same-origin.">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <!-- TODO(kristijanburnik): Minify and merge both: -->
+ <script src="/referrer-policy/generic/common.js"></script>
+ <script src="/referrer-policy/generic/referrer-policy-test-case.js?pipe=sub"></script>
+ </head>
+ <body>
+ <script>
+ ReferrerPolicyTestCase(
+ {
+ "referrer_policy": "origin",
+ "delivery_method": "meta-referrer",
+ "redirection": "keep-origin-redirect",
+ "origin": "same-origin",
+ "source_protocol": "http",
+ "target_protocol": "http",
+ "subresource": "xhr-request",
+ "subresource_path": "/referrer-policy/generic/subresource/xhr.py",
+ "referrer_url": "origin"
+ },
+ document.querySelector("meta[name=assert]").content,
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/origin/meta-referrer/same-origin/http-http/xhr-request/generic.no-redirect.http.html b/testing/web-platform/tests/referrer-policy/origin/meta-referrer/same-origin/http-http/xhr-request/generic.no-redirect.http.html
new file mode 100644
index 000000000..e966c29b6
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/origin/meta-referrer/same-origin/http-http/xhr-request/generic.no-redirect.http.html
@@ -0,0 +1,41 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by referrer-policy/generic/tools/generate.py using referrer-policy/generic/template/test.release.html.template. -->
+<html>
+ <head>
+ <title>Referrer-Policy: Referrer Policy is set to 'origin'</title>
+ <meta name="description" content="Check that all subresources in all casses get only the origin portion of the referrer URL.">
+ <meta name="referrer" content="origin">
+ <link rel="author" title="Kristijan Burnik" href="burnik@chromium.org">
+ <link rel="help" href="https://w3c.github.io/webappsec-referrer-policy/#referrer-policy-origin">
+ <meta name="assert" content="The referrer URL is origin when a
+ document served over http requires an http
+ sub-resource via xhr-request using the meta-referrer
+ delivery method with no-redirect and when
+ the target request is same-origin.">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <!-- TODO(kristijanburnik): Minify and merge both: -->
+ <script src="/referrer-policy/generic/common.js"></script>
+ <script src="/referrer-policy/generic/referrer-policy-test-case.js?pipe=sub"></script>
+ </head>
+ <body>
+ <script>
+ ReferrerPolicyTestCase(
+ {
+ "referrer_policy": "origin",
+ "delivery_method": "meta-referrer",
+ "redirection": "no-redirect",
+ "origin": "same-origin",
+ "source_protocol": "http",
+ "target_protocol": "http",
+ "subresource": "xhr-request",
+ "subresource_path": "/referrer-policy/generic/subresource/xhr.py",
+ "referrer_url": "origin"
+ },
+ document.querySelector("meta[name=assert]").content,
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/origin/meta-referrer/same-origin/http-http/xhr-request/generic.swap-origin-redirect.http.html b/testing/web-platform/tests/referrer-policy/origin/meta-referrer/same-origin/http-http/xhr-request/generic.swap-origin-redirect.http.html
new file mode 100644
index 000000000..175441c9e
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/origin/meta-referrer/same-origin/http-http/xhr-request/generic.swap-origin-redirect.http.html
@@ -0,0 +1,41 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by referrer-policy/generic/tools/generate.py using referrer-policy/generic/template/test.release.html.template. -->
+<html>
+ <head>
+ <title>Referrer-Policy: Referrer Policy is set to 'origin'</title>
+ <meta name="description" content="Check that all subresources in all casses get only the origin portion of the referrer URL.">
+ <meta name="referrer" content="origin">
+ <link rel="author" title="Kristijan Burnik" href="burnik@chromium.org">
+ <link rel="help" href="https://w3c.github.io/webappsec-referrer-policy/#referrer-policy-origin">
+ <meta name="assert" content="The referrer URL is origin when a
+ document served over http requires an http
+ sub-resource via xhr-request using the meta-referrer
+ delivery method with swap-origin-redirect and when
+ the target request is same-origin.">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <!-- TODO(kristijanburnik): Minify and merge both: -->
+ <script src="/referrer-policy/generic/common.js"></script>
+ <script src="/referrer-policy/generic/referrer-policy-test-case.js?pipe=sub"></script>
+ </head>
+ <body>
+ <script>
+ ReferrerPolicyTestCase(
+ {
+ "referrer_policy": "origin",
+ "delivery_method": "meta-referrer",
+ "redirection": "swap-origin-redirect",
+ "origin": "same-origin",
+ "source_protocol": "http",
+ "target_protocol": "http",
+ "subresource": "xhr-request",
+ "subresource_path": "/referrer-policy/generic/subresource/xhr.py",
+ "referrer_url": "origin"
+ },
+ document.querySelector("meta[name=assert]").content,
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/origin/meta-referrer/same-origin/http-https/fetch-request/generic.keep-origin-redirect.http.html b/testing/web-platform/tests/referrer-policy/origin/meta-referrer/same-origin/http-https/fetch-request/generic.keep-origin-redirect.http.html
new file mode 100644
index 000000000..21828b7b7
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/origin/meta-referrer/same-origin/http-https/fetch-request/generic.keep-origin-redirect.http.html
@@ -0,0 +1,41 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by referrer-policy/generic/tools/generate.py using referrer-policy/generic/template/test.release.html.template. -->
+<html>
+ <head>
+ <title>Referrer-Policy: Referrer Policy is set to 'origin'</title>
+ <meta name="description" content="Check that all subresources in all casses get only the origin portion of the referrer URL.">
+ <meta name="referrer" content="origin">
+ <link rel="author" title="Kristijan Burnik" href="burnik@chromium.org">
+ <link rel="help" href="https://w3c.github.io/webappsec-referrer-policy/#referrer-policy-origin">
+ <meta name="assert" content="The referrer URL is origin when a
+ document served over http requires an https
+ sub-resource via fetch-request using the meta-referrer
+ delivery method with keep-origin-redirect and when
+ the target request is same-origin.">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <!-- TODO(kristijanburnik): Minify and merge both: -->
+ <script src="/referrer-policy/generic/common.js"></script>
+ <script src="/referrer-policy/generic/referrer-policy-test-case.js?pipe=sub"></script>
+ </head>
+ <body>
+ <script>
+ ReferrerPolicyTestCase(
+ {
+ "referrer_policy": "origin",
+ "delivery_method": "meta-referrer",
+ "redirection": "keep-origin-redirect",
+ "origin": "same-origin",
+ "source_protocol": "http",
+ "target_protocol": "https",
+ "subresource": "fetch-request",
+ "subresource_path": "/referrer-policy/generic/subresource/xhr.py",
+ "referrer_url": "origin"
+ },
+ document.querySelector("meta[name=assert]").content,
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/origin/meta-referrer/same-origin/http-https/fetch-request/generic.no-redirect.http.html b/testing/web-platform/tests/referrer-policy/origin/meta-referrer/same-origin/http-https/fetch-request/generic.no-redirect.http.html
new file mode 100644
index 000000000..cadd6aa50
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/origin/meta-referrer/same-origin/http-https/fetch-request/generic.no-redirect.http.html
@@ -0,0 +1,41 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by referrer-policy/generic/tools/generate.py using referrer-policy/generic/template/test.release.html.template. -->
+<html>
+ <head>
+ <title>Referrer-Policy: Referrer Policy is set to 'origin'</title>
+ <meta name="description" content="Check that all subresources in all casses get only the origin portion of the referrer URL.">
+ <meta name="referrer" content="origin">
+ <link rel="author" title="Kristijan Burnik" href="burnik@chromium.org">
+ <link rel="help" href="https://w3c.github.io/webappsec-referrer-policy/#referrer-policy-origin">
+ <meta name="assert" content="The referrer URL is origin when a
+ document served over http requires an https
+ sub-resource via fetch-request using the meta-referrer
+ delivery method with no-redirect and when
+ the target request is same-origin.">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <!-- TODO(kristijanburnik): Minify and merge both: -->
+ <script src="/referrer-policy/generic/common.js"></script>
+ <script src="/referrer-policy/generic/referrer-policy-test-case.js?pipe=sub"></script>
+ </head>
+ <body>
+ <script>
+ ReferrerPolicyTestCase(
+ {
+ "referrer_policy": "origin",
+ "delivery_method": "meta-referrer",
+ "redirection": "no-redirect",
+ "origin": "same-origin",
+ "source_protocol": "http",
+ "target_protocol": "https",
+ "subresource": "fetch-request",
+ "subresource_path": "/referrer-policy/generic/subresource/xhr.py",
+ "referrer_url": "origin"
+ },
+ document.querySelector("meta[name=assert]").content,
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/origin/meta-referrer/same-origin/http-https/fetch-request/generic.swap-origin-redirect.http.html b/testing/web-platform/tests/referrer-policy/origin/meta-referrer/same-origin/http-https/fetch-request/generic.swap-origin-redirect.http.html
new file mode 100644
index 000000000..ac6d689b5
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/origin/meta-referrer/same-origin/http-https/fetch-request/generic.swap-origin-redirect.http.html
@@ -0,0 +1,41 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by referrer-policy/generic/tools/generate.py using referrer-policy/generic/template/test.release.html.template. -->
+<html>
+ <head>
+ <title>Referrer-Policy: Referrer Policy is set to 'origin'</title>
+ <meta name="description" content="Check that all subresources in all casses get only the origin portion of the referrer URL.">
+ <meta name="referrer" content="origin">
+ <link rel="author" title="Kristijan Burnik" href="burnik@chromium.org">
+ <link rel="help" href="https://w3c.github.io/webappsec-referrer-policy/#referrer-policy-origin">
+ <meta name="assert" content="The referrer URL is origin when a
+ document served over http requires an https
+ sub-resource via fetch-request using the meta-referrer
+ delivery method with swap-origin-redirect and when
+ the target request is same-origin.">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <!-- TODO(kristijanburnik): Minify and merge both: -->
+ <script src="/referrer-policy/generic/common.js"></script>
+ <script src="/referrer-policy/generic/referrer-policy-test-case.js?pipe=sub"></script>
+ </head>
+ <body>
+ <script>
+ ReferrerPolicyTestCase(
+ {
+ "referrer_policy": "origin",
+ "delivery_method": "meta-referrer",
+ "redirection": "swap-origin-redirect",
+ "origin": "same-origin",
+ "source_protocol": "http",
+ "target_protocol": "https",
+ "subresource": "fetch-request",
+ "subresource_path": "/referrer-policy/generic/subresource/xhr.py",
+ "referrer_url": "origin"
+ },
+ document.querySelector("meta[name=assert]").content,
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/origin/meta-referrer/same-origin/http-https/iframe-tag/generic.keep-origin-redirect.http.html b/testing/web-platform/tests/referrer-policy/origin/meta-referrer/same-origin/http-https/iframe-tag/generic.keep-origin-redirect.http.html
new file mode 100644
index 000000000..92c2e4d40
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/origin/meta-referrer/same-origin/http-https/iframe-tag/generic.keep-origin-redirect.http.html
@@ -0,0 +1,41 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by referrer-policy/generic/tools/generate.py using referrer-policy/generic/template/test.release.html.template. -->
+<html>
+ <head>
+ <title>Referrer-Policy: Referrer Policy is set to 'origin'</title>
+ <meta name="description" content="Check that all subresources in all casses get only the origin portion of the referrer URL.">
+ <meta name="referrer" content="origin">
+ <link rel="author" title="Kristijan Burnik" href="burnik@chromium.org">
+ <link rel="help" href="https://w3c.github.io/webappsec-referrer-policy/#referrer-policy-origin">
+ <meta name="assert" content="The referrer URL is origin when a
+ document served over http requires an https
+ sub-resource via iframe-tag using the meta-referrer
+ delivery method with keep-origin-redirect and when
+ the target request is same-origin.">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <!-- TODO(kristijanburnik): Minify and merge both: -->
+ <script src="/referrer-policy/generic/common.js"></script>
+ <script src="/referrer-policy/generic/referrer-policy-test-case.js?pipe=sub"></script>
+ </head>
+ <body>
+ <script>
+ ReferrerPolicyTestCase(
+ {
+ "referrer_policy": "origin",
+ "delivery_method": "meta-referrer",
+ "redirection": "keep-origin-redirect",
+ "origin": "same-origin",
+ "source_protocol": "http",
+ "target_protocol": "https",
+ "subresource": "iframe-tag",
+ "subresource_path": "/referrer-policy/generic/subresource/document.py",
+ "referrer_url": "origin"
+ },
+ document.querySelector("meta[name=assert]").content,
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/origin/meta-referrer/same-origin/http-https/iframe-tag/generic.no-redirect.http.html b/testing/web-platform/tests/referrer-policy/origin/meta-referrer/same-origin/http-https/iframe-tag/generic.no-redirect.http.html
new file mode 100644
index 000000000..eceedcb15
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/origin/meta-referrer/same-origin/http-https/iframe-tag/generic.no-redirect.http.html
@@ -0,0 +1,41 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by referrer-policy/generic/tools/generate.py using referrer-policy/generic/template/test.release.html.template. -->
+<html>
+ <head>
+ <title>Referrer-Policy: Referrer Policy is set to 'origin'</title>
+ <meta name="description" content="Check that all subresources in all casses get only the origin portion of the referrer URL.">
+ <meta name="referrer" content="origin">
+ <link rel="author" title="Kristijan Burnik" href="burnik@chromium.org">
+ <link rel="help" href="https://w3c.github.io/webappsec-referrer-policy/#referrer-policy-origin">
+ <meta name="assert" content="The referrer URL is origin when a
+ document served over http requires an https
+ sub-resource via iframe-tag using the meta-referrer
+ delivery method with no-redirect and when
+ the target request is same-origin.">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <!-- TODO(kristijanburnik): Minify and merge both: -->
+ <script src="/referrer-policy/generic/common.js"></script>
+ <script src="/referrer-policy/generic/referrer-policy-test-case.js?pipe=sub"></script>
+ </head>
+ <body>
+ <script>
+ ReferrerPolicyTestCase(
+ {
+ "referrer_policy": "origin",
+ "delivery_method": "meta-referrer",
+ "redirection": "no-redirect",
+ "origin": "same-origin",
+ "source_protocol": "http",
+ "target_protocol": "https",
+ "subresource": "iframe-tag",
+ "subresource_path": "/referrer-policy/generic/subresource/document.py",
+ "referrer_url": "origin"
+ },
+ document.querySelector("meta[name=assert]").content,
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/origin/meta-referrer/same-origin/http-https/iframe-tag/generic.swap-origin-redirect.http.html b/testing/web-platform/tests/referrer-policy/origin/meta-referrer/same-origin/http-https/iframe-tag/generic.swap-origin-redirect.http.html
new file mode 100644
index 000000000..e847df8ff
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/origin/meta-referrer/same-origin/http-https/iframe-tag/generic.swap-origin-redirect.http.html
@@ -0,0 +1,41 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by referrer-policy/generic/tools/generate.py using referrer-policy/generic/template/test.release.html.template. -->
+<html>
+ <head>
+ <title>Referrer-Policy: Referrer Policy is set to 'origin'</title>
+ <meta name="description" content="Check that all subresources in all casses get only the origin portion of the referrer URL.">
+ <meta name="referrer" content="origin">
+ <link rel="author" title="Kristijan Burnik" href="burnik@chromium.org">
+ <link rel="help" href="https://w3c.github.io/webappsec-referrer-policy/#referrer-policy-origin">
+ <meta name="assert" content="The referrer URL is origin when a
+ document served over http requires an https
+ sub-resource via iframe-tag using the meta-referrer
+ delivery method with swap-origin-redirect and when
+ the target request is same-origin.">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <!-- TODO(kristijanburnik): Minify and merge both: -->
+ <script src="/referrer-policy/generic/common.js"></script>
+ <script src="/referrer-policy/generic/referrer-policy-test-case.js?pipe=sub"></script>
+ </head>
+ <body>
+ <script>
+ ReferrerPolicyTestCase(
+ {
+ "referrer_policy": "origin",
+ "delivery_method": "meta-referrer",
+ "redirection": "swap-origin-redirect",
+ "origin": "same-origin",
+ "source_protocol": "http",
+ "target_protocol": "https",
+ "subresource": "iframe-tag",
+ "subresource_path": "/referrer-policy/generic/subresource/document.py",
+ "referrer_url": "origin"
+ },
+ document.querySelector("meta[name=assert]").content,
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/origin/meta-referrer/same-origin/http-https/img-tag/generic.keep-origin-redirect.http.html b/testing/web-platform/tests/referrer-policy/origin/meta-referrer/same-origin/http-https/img-tag/generic.keep-origin-redirect.http.html
new file mode 100644
index 000000000..9cb83cb0c
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/origin/meta-referrer/same-origin/http-https/img-tag/generic.keep-origin-redirect.http.html
@@ -0,0 +1,41 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by referrer-policy/generic/tools/generate.py using referrer-policy/generic/template/test.release.html.template. -->
+<html>
+ <head>
+ <title>Referrer-Policy: Referrer Policy is set to 'origin'</title>
+ <meta name="description" content="Check that all subresources in all casses get only the origin portion of the referrer URL.">
+ <meta name="referrer" content="origin">
+ <link rel="author" title="Kristijan Burnik" href="burnik@chromium.org">
+ <link rel="help" href="https://w3c.github.io/webappsec-referrer-policy/#referrer-policy-origin">
+ <meta name="assert" content="The referrer URL is origin when a
+ document served over http requires an https
+ sub-resource via img-tag using the meta-referrer
+ delivery method with keep-origin-redirect and when
+ the target request is same-origin.">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <!-- TODO(kristijanburnik): Minify and merge both: -->
+ <script src="/referrer-policy/generic/common.js"></script>
+ <script src="/referrer-policy/generic/referrer-policy-test-case.js?pipe=sub"></script>
+ </head>
+ <body>
+ <script>
+ ReferrerPolicyTestCase(
+ {
+ "referrer_policy": "origin",
+ "delivery_method": "meta-referrer",
+ "redirection": "keep-origin-redirect",
+ "origin": "same-origin",
+ "source_protocol": "http",
+ "target_protocol": "https",
+ "subresource": "img-tag",
+ "subresource_path": "/referrer-policy/generic/subresource/image.py",
+ "referrer_url": "origin"
+ },
+ document.querySelector("meta[name=assert]").content,
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/origin/meta-referrer/same-origin/http-https/img-tag/generic.no-redirect.http.html b/testing/web-platform/tests/referrer-policy/origin/meta-referrer/same-origin/http-https/img-tag/generic.no-redirect.http.html
new file mode 100644
index 000000000..700d95828
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/origin/meta-referrer/same-origin/http-https/img-tag/generic.no-redirect.http.html
@@ -0,0 +1,41 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by referrer-policy/generic/tools/generate.py using referrer-policy/generic/template/test.release.html.template. -->
+<html>
+ <head>
+ <title>Referrer-Policy: Referrer Policy is set to 'origin'</title>
+ <meta name="description" content="Check that all subresources in all casses get only the origin portion of the referrer URL.">
+ <meta name="referrer" content="origin">
+ <link rel="author" title="Kristijan Burnik" href="burnik@chromium.org">
+ <link rel="help" href="https://w3c.github.io/webappsec-referrer-policy/#referrer-policy-origin">
+ <meta name="assert" content="The referrer URL is origin when a
+ document served over http requires an https
+ sub-resource via img-tag using the meta-referrer
+ delivery method with no-redirect and when
+ the target request is same-origin.">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <!-- TODO(kristijanburnik): Minify and merge both: -->
+ <script src="/referrer-policy/generic/common.js"></script>
+ <script src="/referrer-policy/generic/referrer-policy-test-case.js?pipe=sub"></script>
+ </head>
+ <body>
+ <script>
+ ReferrerPolicyTestCase(
+ {
+ "referrer_policy": "origin",
+ "delivery_method": "meta-referrer",
+ "redirection": "no-redirect",
+ "origin": "same-origin",
+ "source_protocol": "http",
+ "target_protocol": "https",
+ "subresource": "img-tag",
+ "subresource_path": "/referrer-policy/generic/subresource/image.py",
+ "referrer_url": "origin"
+ },
+ document.querySelector("meta[name=assert]").content,
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/origin/meta-referrer/same-origin/http-https/img-tag/generic.swap-origin-redirect.http.html b/testing/web-platform/tests/referrer-policy/origin/meta-referrer/same-origin/http-https/img-tag/generic.swap-origin-redirect.http.html
new file mode 100644
index 000000000..73c907dea
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/origin/meta-referrer/same-origin/http-https/img-tag/generic.swap-origin-redirect.http.html
@@ -0,0 +1,41 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by referrer-policy/generic/tools/generate.py using referrer-policy/generic/template/test.release.html.template. -->
+<html>
+ <head>
+ <title>Referrer-Policy: Referrer Policy is set to 'origin'</title>
+ <meta name="description" content="Check that all subresources in all casses get only the origin portion of the referrer URL.">
+ <meta name="referrer" content="origin">
+ <link rel="author" title="Kristijan Burnik" href="burnik@chromium.org">
+ <link rel="help" href="https://w3c.github.io/webappsec-referrer-policy/#referrer-policy-origin">
+ <meta name="assert" content="The referrer URL is origin when a
+ document served over http requires an https
+ sub-resource via img-tag using the meta-referrer
+ delivery method with swap-origin-redirect and when
+ the target request is same-origin.">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <!-- TODO(kristijanburnik): Minify and merge both: -->
+ <script src="/referrer-policy/generic/common.js"></script>
+ <script src="/referrer-policy/generic/referrer-policy-test-case.js?pipe=sub"></script>
+ </head>
+ <body>
+ <script>
+ ReferrerPolicyTestCase(
+ {
+ "referrer_policy": "origin",
+ "delivery_method": "meta-referrer",
+ "redirection": "swap-origin-redirect",
+ "origin": "same-origin",
+ "source_protocol": "http",
+ "target_protocol": "https",
+ "subresource": "img-tag",
+ "subresource_path": "/referrer-policy/generic/subresource/image.py",
+ "referrer_url": "origin"
+ },
+ document.querySelector("meta[name=assert]").content,
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/origin/meta-referrer/same-origin/http-https/script-tag/generic.keep-origin-redirect.http.html b/testing/web-platform/tests/referrer-policy/origin/meta-referrer/same-origin/http-https/script-tag/generic.keep-origin-redirect.http.html
new file mode 100644
index 000000000..2b7786cd3
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/origin/meta-referrer/same-origin/http-https/script-tag/generic.keep-origin-redirect.http.html
@@ -0,0 +1,41 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by referrer-policy/generic/tools/generate.py using referrer-policy/generic/template/test.release.html.template. -->
+<html>
+ <head>
+ <title>Referrer-Policy: Referrer Policy is set to 'origin'</title>
+ <meta name="description" content="Check that all subresources in all casses get only the origin portion of the referrer URL.">
+ <meta name="referrer" content="origin">
+ <link rel="author" title="Kristijan Burnik" href="burnik@chromium.org">
+ <link rel="help" href="https://w3c.github.io/webappsec-referrer-policy/#referrer-policy-origin">
+ <meta name="assert" content="The referrer URL is origin when a
+ document served over http requires an https
+ sub-resource via script-tag using the meta-referrer
+ delivery method with keep-origin-redirect and when
+ the target request is same-origin.">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <!-- TODO(kristijanburnik): Minify and merge both: -->
+ <script src="/referrer-policy/generic/common.js"></script>
+ <script src="/referrer-policy/generic/referrer-policy-test-case.js?pipe=sub"></script>
+ </head>
+ <body>
+ <script>
+ ReferrerPolicyTestCase(
+ {
+ "referrer_policy": "origin",
+ "delivery_method": "meta-referrer",
+ "redirection": "keep-origin-redirect",
+ "origin": "same-origin",
+ "source_protocol": "http",
+ "target_protocol": "https",
+ "subresource": "script-tag",
+ "subresource_path": "/referrer-policy/generic/subresource/script.py",
+ "referrer_url": "origin"
+ },
+ document.querySelector("meta[name=assert]").content,
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/origin/meta-referrer/same-origin/http-https/script-tag/generic.no-redirect.http.html b/testing/web-platform/tests/referrer-policy/origin/meta-referrer/same-origin/http-https/script-tag/generic.no-redirect.http.html
new file mode 100644
index 000000000..15ff14f65
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/origin/meta-referrer/same-origin/http-https/script-tag/generic.no-redirect.http.html
@@ -0,0 +1,41 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by referrer-policy/generic/tools/generate.py using referrer-policy/generic/template/test.release.html.template. -->
+<html>
+ <head>
+ <title>Referrer-Policy: Referrer Policy is set to 'origin'</title>
+ <meta name="description" content="Check that all subresources in all casses get only the origin portion of the referrer URL.">
+ <meta name="referrer" content="origin">
+ <link rel="author" title="Kristijan Burnik" href="burnik@chromium.org">
+ <link rel="help" href="https://w3c.github.io/webappsec-referrer-policy/#referrer-policy-origin">
+ <meta name="assert" content="The referrer URL is origin when a
+ document served over http requires an https
+ sub-resource via script-tag using the meta-referrer
+ delivery method with no-redirect and when
+ the target request is same-origin.">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <!-- TODO(kristijanburnik): Minify and merge both: -->
+ <script src="/referrer-policy/generic/common.js"></script>
+ <script src="/referrer-policy/generic/referrer-policy-test-case.js?pipe=sub"></script>
+ </head>
+ <body>
+ <script>
+ ReferrerPolicyTestCase(
+ {
+ "referrer_policy": "origin",
+ "delivery_method": "meta-referrer",
+ "redirection": "no-redirect",
+ "origin": "same-origin",
+ "source_protocol": "http",
+ "target_protocol": "https",
+ "subresource": "script-tag",
+ "subresource_path": "/referrer-policy/generic/subresource/script.py",
+ "referrer_url": "origin"
+ },
+ document.querySelector("meta[name=assert]").content,
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/origin/meta-referrer/same-origin/http-https/script-tag/generic.swap-origin-redirect.http.html b/testing/web-platform/tests/referrer-policy/origin/meta-referrer/same-origin/http-https/script-tag/generic.swap-origin-redirect.http.html
new file mode 100644
index 000000000..ba8411200
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/origin/meta-referrer/same-origin/http-https/script-tag/generic.swap-origin-redirect.http.html
@@ -0,0 +1,41 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by referrer-policy/generic/tools/generate.py using referrer-policy/generic/template/test.release.html.template. -->
+<html>
+ <head>
+ <title>Referrer-Policy: Referrer Policy is set to 'origin'</title>
+ <meta name="description" content="Check that all subresources in all casses get only the origin portion of the referrer URL.">
+ <meta name="referrer" content="origin">
+ <link rel="author" title="Kristijan Burnik" href="burnik@chromium.org">
+ <link rel="help" href="https://w3c.github.io/webappsec-referrer-policy/#referrer-policy-origin">
+ <meta name="assert" content="The referrer URL is origin when a
+ document served over http requires an https
+ sub-resource via script-tag using the meta-referrer
+ delivery method with swap-origin-redirect and when
+ the target request is same-origin.">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <!-- TODO(kristijanburnik): Minify and merge both: -->
+ <script src="/referrer-policy/generic/common.js"></script>
+ <script src="/referrer-policy/generic/referrer-policy-test-case.js?pipe=sub"></script>
+ </head>
+ <body>
+ <script>
+ ReferrerPolicyTestCase(
+ {
+ "referrer_policy": "origin",
+ "delivery_method": "meta-referrer",
+ "redirection": "swap-origin-redirect",
+ "origin": "same-origin",
+ "source_protocol": "http",
+ "target_protocol": "https",
+ "subresource": "script-tag",
+ "subresource_path": "/referrer-policy/generic/subresource/script.py",
+ "referrer_url": "origin"
+ },
+ document.querySelector("meta[name=assert]").content,
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/origin/meta-referrer/same-origin/http-https/xhr-request/generic.keep-origin-redirect.http.html b/testing/web-platform/tests/referrer-policy/origin/meta-referrer/same-origin/http-https/xhr-request/generic.keep-origin-redirect.http.html
new file mode 100644
index 000000000..60df8dd48
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/origin/meta-referrer/same-origin/http-https/xhr-request/generic.keep-origin-redirect.http.html
@@ -0,0 +1,41 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by referrer-policy/generic/tools/generate.py using referrer-policy/generic/template/test.release.html.template. -->
+<html>
+ <head>
+ <title>Referrer-Policy: Referrer Policy is set to 'origin'</title>
+ <meta name="description" content="Check that all subresources in all casses get only the origin portion of the referrer URL.">
+ <meta name="referrer" content="origin">
+ <link rel="author" title="Kristijan Burnik" href="burnik@chromium.org">
+ <link rel="help" href="https://w3c.github.io/webappsec-referrer-policy/#referrer-policy-origin">
+ <meta name="assert" content="The referrer URL is origin when a
+ document served over http requires an https
+ sub-resource via xhr-request using the meta-referrer
+ delivery method with keep-origin-redirect and when
+ the target request is same-origin.">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <!-- TODO(kristijanburnik): Minify and merge both: -->
+ <script src="/referrer-policy/generic/common.js"></script>
+ <script src="/referrer-policy/generic/referrer-policy-test-case.js?pipe=sub"></script>
+ </head>
+ <body>
+ <script>
+ ReferrerPolicyTestCase(
+ {
+ "referrer_policy": "origin",
+ "delivery_method": "meta-referrer",
+ "redirection": "keep-origin-redirect",
+ "origin": "same-origin",
+ "source_protocol": "http",
+ "target_protocol": "https",
+ "subresource": "xhr-request",
+ "subresource_path": "/referrer-policy/generic/subresource/xhr.py",
+ "referrer_url": "origin"
+ },
+ document.querySelector("meta[name=assert]").content,
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/origin/meta-referrer/same-origin/http-https/xhr-request/generic.no-redirect.http.html b/testing/web-platform/tests/referrer-policy/origin/meta-referrer/same-origin/http-https/xhr-request/generic.no-redirect.http.html
new file mode 100644
index 000000000..a119d66be
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/origin/meta-referrer/same-origin/http-https/xhr-request/generic.no-redirect.http.html
@@ -0,0 +1,41 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by referrer-policy/generic/tools/generate.py using referrer-policy/generic/template/test.release.html.template. -->
+<html>
+ <head>
+ <title>Referrer-Policy: Referrer Policy is set to 'origin'</title>
+ <meta name="description" content="Check that all subresources in all casses get only the origin portion of the referrer URL.">
+ <meta name="referrer" content="origin">
+ <link rel="author" title="Kristijan Burnik" href="burnik@chromium.org">
+ <link rel="help" href="https://w3c.github.io/webappsec-referrer-policy/#referrer-policy-origin">
+ <meta name="assert" content="The referrer URL is origin when a
+ document served over http requires an https
+ sub-resource via xhr-request using the meta-referrer
+ delivery method with no-redirect and when
+ the target request is same-origin.">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <!-- TODO(kristijanburnik): Minify and merge both: -->
+ <script src="/referrer-policy/generic/common.js"></script>
+ <script src="/referrer-policy/generic/referrer-policy-test-case.js?pipe=sub"></script>
+ </head>
+ <body>
+ <script>
+ ReferrerPolicyTestCase(
+ {
+ "referrer_policy": "origin",
+ "delivery_method": "meta-referrer",
+ "redirection": "no-redirect",
+ "origin": "same-origin",
+ "source_protocol": "http",
+ "target_protocol": "https",
+ "subresource": "xhr-request",
+ "subresource_path": "/referrer-policy/generic/subresource/xhr.py",
+ "referrer_url": "origin"
+ },
+ document.querySelector("meta[name=assert]").content,
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/origin/meta-referrer/same-origin/http-https/xhr-request/generic.swap-origin-redirect.http.html b/testing/web-platform/tests/referrer-policy/origin/meta-referrer/same-origin/http-https/xhr-request/generic.swap-origin-redirect.http.html
new file mode 100644
index 000000000..47c8084c3
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/origin/meta-referrer/same-origin/http-https/xhr-request/generic.swap-origin-redirect.http.html
@@ -0,0 +1,41 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by referrer-policy/generic/tools/generate.py using referrer-policy/generic/template/test.release.html.template. -->
+<html>
+ <head>
+ <title>Referrer-Policy: Referrer Policy is set to 'origin'</title>
+ <meta name="description" content="Check that all subresources in all casses get only the origin portion of the referrer URL.">
+ <meta name="referrer" content="origin">
+ <link rel="author" title="Kristijan Burnik" href="burnik@chromium.org">
+ <link rel="help" href="https://w3c.github.io/webappsec-referrer-policy/#referrer-policy-origin">
+ <meta name="assert" content="The referrer URL is origin when a
+ document served over http requires an https
+ sub-resource via xhr-request using the meta-referrer
+ delivery method with swap-origin-redirect and when
+ the target request is same-origin.">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <!-- TODO(kristijanburnik): Minify and merge both: -->
+ <script src="/referrer-policy/generic/common.js"></script>
+ <script src="/referrer-policy/generic/referrer-policy-test-case.js?pipe=sub"></script>
+ </head>
+ <body>
+ <script>
+ ReferrerPolicyTestCase(
+ {
+ "referrer_policy": "origin",
+ "delivery_method": "meta-referrer",
+ "redirection": "swap-origin-redirect",
+ "origin": "same-origin",
+ "source_protocol": "http",
+ "target_protocol": "https",
+ "subresource": "xhr-request",
+ "subresource_path": "/referrer-policy/generic/subresource/xhr.py",
+ "referrer_url": "origin"
+ },
+ document.querySelector("meta[name=assert]").content,
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>