summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/upgrade-insecure-requests
diff options
context:
space:
mode:
Diffstat (limited to 'testing/web-platform/tests/upgrade-insecure-requests')
-rw-r--r--testing/web-platform/tests/upgrade-insecure-requests/META.yml3
-rw-r--r--testing/web-platform/tests/upgrade-insecure-requests/README.md4
-rw-r--r--testing/web-platform/tests/upgrade-insecure-requests/gen/iframe-blank-inherit.meta/unset/fetch.https.html112
-rw-r--r--testing/web-platform/tests/upgrade-insecure-requests/gen/iframe-blank-inherit.meta/unset/iframe-tag.https.html112
-rw-r--r--testing/web-platform/tests/upgrade-insecure-requests/gen/iframe-blank-inherit.meta/unset/img-tag.https.html112
-rw-r--r--testing/web-platform/tests/upgrade-insecure-requests/gen/iframe-blank-inherit.meta/unset/sharedworker-classic.https.html67
-rw-r--r--testing/web-platform/tests/upgrade-insecure-requests/gen/iframe-blank-inherit.meta/unset/sharedworker-import-data.https.html112
-rw-r--r--testing/web-platform/tests/upgrade-insecure-requests/gen/iframe-blank-inherit.meta/unset/sharedworker-import.https.html112
-rw-r--r--testing/web-platform/tests/upgrade-insecure-requests/gen/iframe-blank-inherit.meta/unset/sharedworker-module.https.html67
-rw-r--r--testing/web-platform/tests/upgrade-insecure-requests/gen/iframe-blank-inherit.meta/unset/websocket.https.html52
-rw-r--r--testing/web-platform/tests/upgrade-insecure-requests/gen/iframe-blank-inherit.meta/unset/worker-classic.https.html67
-rw-r--r--testing/web-platform/tests/upgrade-insecure-requests/gen/iframe-blank-inherit.meta/unset/worker-import-data.https.html112
-rw-r--r--testing/web-platform/tests/upgrade-insecure-requests/gen/iframe-blank-inherit.meta/unset/worker-import.https.html112
-rw-r--r--testing/web-platform/tests/upgrade-insecure-requests/gen/iframe-blank-inherit.meta/unset/worker-module.https.html67
-rw-r--r--testing/web-platform/tests/upgrade-insecure-requests/gen/iframe-blank-inherit.meta/unset/worklet-animation-import-data.https.html112
-rw-r--r--testing/web-platform/tests/upgrade-insecure-requests/gen/iframe-blank-inherit.meta/unset/worklet-animation.https.html112
-rw-r--r--testing/web-platform/tests/upgrade-insecure-requests/gen/iframe-blank-inherit.meta/unset/worklet-audio-import-data.https.html112
-rw-r--r--testing/web-platform/tests/upgrade-insecure-requests/gen/iframe-blank-inherit.meta/unset/worklet-audio.https.html112
-rw-r--r--testing/web-platform/tests/upgrade-insecure-requests/gen/iframe-blank-inherit.meta/unset/worklet-layout-import-data.https.html112
-rw-r--r--testing/web-platform/tests/upgrade-insecure-requests/gen/iframe-blank-inherit.meta/unset/worklet-layout.https.html112
-rw-r--r--testing/web-platform/tests/upgrade-insecure-requests/gen/iframe-blank-inherit.meta/unset/worklet-paint-import-data.https.html112
-rw-r--r--testing/web-platform/tests/upgrade-insecure-requests/gen/iframe-blank-inherit.meta/unset/worklet-paint.https.html112
-rw-r--r--testing/web-platform/tests/upgrade-insecure-requests/gen/iframe-blank-inherit.meta/unset/xhr.https.html112
-rw-r--r--testing/web-platform/tests/upgrade-insecure-requests/gen/iframe-blank-inherit.meta/upgrade/fetch.https.html113
-rw-r--r--testing/web-platform/tests/upgrade-insecure-requests/gen/iframe-blank-inherit.meta/upgrade/iframe-tag.https.html113
-rw-r--r--testing/web-platform/tests/upgrade-insecure-requests/gen/iframe-blank-inherit.meta/upgrade/img-tag.https.html113
-rw-r--r--testing/web-platform/tests/upgrade-insecure-requests/gen/iframe-blank-inherit.meta/upgrade/sharedworker-classic.https.html68
-rw-r--r--testing/web-platform/tests/upgrade-insecure-requests/gen/iframe-blank-inherit.meta/upgrade/sharedworker-import-data.https.html113
-rw-r--r--testing/web-platform/tests/upgrade-insecure-requests/gen/iframe-blank-inherit.meta/upgrade/sharedworker-import.https.html113
-rw-r--r--testing/web-platform/tests/upgrade-insecure-requests/gen/iframe-blank-inherit.meta/upgrade/sharedworker-module.https.html68
-rw-r--r--testing/web-platform/tests/upgrade-insecure-requests/gen/iframe-blank-inherit.meta/upgrade/websocket.https.html53
-rw-r--r--testing/web-platform/tests/upgrade-insecure-requests/gen/iframe-blank-inherit.meta/upgrade/worker-classic.https.html68
-rw-r--r--testing/web-platform/tests/upgrade-insecure-requests/gen/iframe-blank-inherit.meta/upgrade/worker-import-data.https.html113
-rw-r--r--testing/web-platform/tests/upgrade-insecure-requests/gen/iframe-blank-inherit.meta/upgrade/worker-import.https.html113
-rw-r--r--testing/web-platform/tests/upgrade-insecure-requests/gen/iframe-blank-inherit.meta/upgrade/worker-module.https.html68
-rw-r--r--testing/web-platform/tests/upgrade-insecure-requests/gen/iframe-blank-inherit.meta/upgrade/worklet-animation-import-data.https.html113
-rw-r--r--testing/web-platform/tests/upgrade-insecure-requests/gen/iframe-blank-inherit.meta/upgrade/worklet-animation.https.html113
-rw-r--r--testing/web-platform/tests/upgrade-insecure-requests/gen/iframe-blank-inherit.meta/upgrade/worklet-audio-import-data.https.html113
-rw-r--r--testing/web-platform/tests/upgrade-insecure-requests/gen/iframe-blank-inherit.meta/upgrade/worklet-audio.https.html113
-rw-r--r--testing/web-platform/tests/upgrade-insecure-requests/gen/iframe-blank-inherit.meta/upgrade/worklet-layout-import-data.https.html113
-rw-r--r--testing/web-platform/tests/upgrade-insecure-requests/gen/iframe-blank-inherit.meta/upgrade/worklet-layout.https.html113
-rw-r--r--testing/web-platform/tests/upgrade-insecure-requests/gen/iframe-blank-inherit.meta/upgrade/worklet-paint-import-data.https.html113
-rw-r--r--testing/web-platform/tests/upgrade-insecure-requests/gen/iframe-blank-inherit.meta/upgrade/worklet-paint.https.html113
-rw-r--r--testing/web-platform/tests/upgrade-insecure-requests/gen/iframe-blank-inherit.meta/upgrade/xhr.https.html113
-rw-r--r--testing/web-platform/tests/upgrade-insecure-requests/gen/sharedworker-classic-data.http-rp/upgrade/fetch.https.html112
-rw-r--r--testing/web-platform/tests/upgrade-insecure-requests/gen/sharedworker-classic-data.http-rp/upgrade/fetch.https.html.headers1
-rw-r--r--testing/web-platform/tests/upgrade-insecure-requests/gen/sharedworker-classic-data.http-rp/upgrade/websocket.https.html52
-rw-r--r--testing/web-platform/tests/upgrade-insecure-requests/gen/sharedworker-classic-data.http-rp/upgrade/websocket.https.html.headers1
-rw-r--r--testing/web-platform/tests/upgrade-insecure-requests/gen/sharedworker-classic-data.http-rp/upgrade/xhr.https.html112
-rw-r--r--testing/web-platform/tests/upgrade-insecure-requests/gen/sharedworker-classic-data.http-rp/upgrade/xhr.https.html.headers1
-rw-r--r--testing/web-platform/tests/upgrade-insecure-requests/gen/sharedworker-classic-data.meta/unset/fetch.https.html112
-rw-r--r--testing/web-platform/tests/upgrade-insecure-requests/gen/sharedworker-classic-data.meta/unset/websocket.https.html52
-rw-r--r--testing/web-platform/tests/upgrade-insecure-requests/gen/sharedworker-classic-data.meta/unset/xhr.https.html112
-rw-r--r--testing/web-platform/tests/upgrade-insecure-requests/gen/sharedworker-classic-data.meta/upgrade/fetch.https.html113
-rw-r--r--testing/web-platform/tests/upgrade-insecure-requests/gen/sharedworker-classic-data.meta/upgrade/websocket.https.html53
-rw-r--r--testing/web-platform/tests/upgrade-insecure-requests/gen/sharedworker-classic-data.meta/upgrade/xhr.https.html113
-rw-r--r--testing/web-platform/tests/upgrade-insecure-requests/gen/sharedworker-classic.http-rp/upgrade/fetch.https.html148
-rw-r--r--testing/web-platform/tests/upgrade-insecure-requests/gen/sharedworker-classic.http-rp/upgrade/websocket.https.html64
-rw-r--r--testing/web-platform/tests/upgrade-insecure-requests/gen/sharedworker-classic.http-rp/upgrade/xhr.https.html148
-rw-r--r--testing/web-platform/tests/upgrade-insecure-requests/gen/sharedworker-module-data.http-rp/upgrade/fetch.https.html112
-rw-r--r--testing/web-platform/tests/upgrade-insecure-requests/gen/sharedworker-module-data.http-rp/upgrade/fetch.https.html.headers1
-rw-r--r--testing/web-platform/tests/upgrade-insecure-requests/gen/sharedworker-module-data.http-rp/upgrade/websocket.https.html52
-rw-r--r--testing/web-platform/tests/upgrade-insecure-requests/gen/sharedworker-module-data.http-rp/upgrade/websocket.https.html.headers1
-rw-r--r--testing/web-platform/tests/upgrade-insecure-requests/gen/sharedworker-module-data.http-rp/upgrade/xhr.https.html112
-rw-r--r--testing/web-platform/tests/upgrade-insecure-requests/gen/sharedworker-module-data.http-rp/upgrade/xhr.https.html.headers1
-rw-r--r--testing/web-platform/tests/upgrade-insecure-requests/gen/sharedworker-module-data.meta/unset/fetch.https.html112
-rw-r--r--testing/web-platform/tests/upgrade-insecure-requests/gen/sharedworker-module-data.meta/unset/websocket.https.html52
-rw-r--r--testing/web-platform/tests/upgrade-insecure-requests/gen/sharedworker-module-data.meta/unset/xhr.https.html112
-rw-r--r--testing/web-platform/tests/upgrade-insecure-requests/gen/sharedworker-module-data.meta/upgrade/fetch.https.html113
-rw-r--r--testing/web-platform/tests/upgrade-insecure-requests/gen/sharedworker-module-data.meta/upgrade/websocket.https.html53
-rw-r--r--testing/web-platform/tests/upgrade-insecure-requests/gen/sharedworker-module-data.meta/upgrade/xhr.https.html113
-rw-r--r--testing/web-platform/tests/upgrade-insecure-requests/gen/sharedworker-module.http-rp/upgrade/fetch.https.html148
-rw-r--r--testing/web-platform/tests/upgrade-insecure-requests/gen/sharedworker-module.http-rp/upgrade/websocket.https.html64
-rw-r--r--testing/web-platform/tests/upgrade-insecure-requests/gen/sharedworker-module.http-rp/upgrade/xhr.https.html148
-rw-r--r--testing/web-platform/tests/upgrade-insecure-requests/gen/srcdoc-inherit.meta/unset/fetch.https.html112
-rw-r--r--testing/web-platform/tests/upgrade-insecure-requests/gen/srcdoc-inherit.meta/unset/iframe-tag.https.html112
-rw-r--r--testing/web-platform/tests/upgrade-insecure-requests/gen/srcdoc-inherit.meta/unset/img-tag.https.html112
-rw-r--r--testing/web-platform/tests/upgrade-insecure-requests/gen/srcdoc-inherit.meta/unset/sharedworker-classic.https.html67
-rw-r--r--testing/web-platform/tests/upgrade-insecure-requests/gen/srcdoc-inherit.meta/unset/sharedworker-import-data.https.html112
-rw-r--r--testing/web-platform/tests/upgrade-insecure-requests/gen/srcdoc-inherit.meta/unset/sharedworker-import.https.html112
-rw-r--r--testing/web-platform/tests/upgrade-insecure-requests/gen/srcdoc-inherit.meta/unset/sharedworker-module.https.html67
-rw-r--r--testing/web-platform/tests/upgrade-insecure-requests/gen/srcdoc-inherit.meta/unset/websocket.https.html52
-rw-r--r--testing/web-platform/tests/upgrade-insecure-requests/gen/srcdoc-inherit.meta/unset/worker-classic.https.html67
-rw-r--r--testing/web-platform/tests/upgrade-insecure-requests/gen/srcdoc-inherit.meta/unset/worker-import-data.https.html112
-rw-r--r--testing/web-platform/tests/upgrade-insecure-requests/gen/srcdoc-inherit.meta/unset/worker-import.https.html112
-rw-r--r--testing/web-platform/tests/upgrade-insecure-requests/gen/srcdoc-inherit.meta/unset/worker-module.https.html67
-rw-r--r--testing/web-platform/tests/upgrade-insecure-requests/gen/srcdoc-inherit.meta/unset/worklet-animation-import-data.https.html112
-rw-r--r--testing/web-platform/tests/upgrade-insecure-requests/gen/srcdoc-inherit.meta/unset/worklet-animation.https.html112
-rw-r--r--testing/web-platform/tests/upgrade-insecure-requests/gen/srcdoc-inherit.meta/unset/worklet-audio-import-data.https.html112
-rw-r--r--testing/web-platform/tests/upgrade-insecure-requests/gen/srcdoc-inherit.meta/unset/worklet-audio.https.html112
-rw-r--r--testing/web-platform/tests/upgrade-insecure-requests/gen/srcdoc-inherit.meta/unset/worklet-layout-import-data.https.html112
-rw-r--r--testing/web-platform/tests/upgrade-insecure-requests/gen/srcdoc-inherit.meta/unset/worklet-layout.https.html112
-rw-r--r--testing/web-platform/tests/upgrade-insecure-requests/gen/srcdoc-inherit.meta/unset/worklet-paint-import-data.https.html112
-rw-r--r--testing/web-platform/tests/upgrade-insecure-requests/gen/srcdoc-inherit.meta/unset/worklet-paint.https.html112
-rw-r--r--testing/web-platform/tests/upgrade-insecure-requests/gen/srcdoc-inherit.meta/unset/xhr.https.html112
-rw-r--r--testing/web-platform/tests/upgrade-insecure-requests/gen/srcdoc-inherit.meta/upgrade/fetch.https.html113
-rw-r--r--testing/web-platform/tests/upgrade-insecure-requests/gen/srcdoc-inherit.meta/upgrade/iframe-tag.https.html113
-rw-r--r--testing/web-platform/tests/upgrade-insecure-requests/gen/srcdoc-inherit.meta/upgrade/img-tag.https.html113
-rw-r--r--testing/web-platform/tests/upgrade-insecure-requests/gen/srcdoc-inherit.meta/upgrade/sharedworker-classic.https.html68
-rw-r--r--testing/web-platform/tests/upgrade-insecure-requests/gen/srcdoc-inherit.meta/upgrade/sharedworker-import-data.https.html113
-rw-r--r--testing/web-platform/tests/upgrade-insecure-requests/gen/srcdoc-inherit.meta/upgrade/sharedworker-import.https.html113
-rw-r--r--testing/web-platform/tests/upgrade-insecure-requests/gen/srcdoc-inherit.meta/upgrade/sharedworker-module.https.html68
-rw-r--r--testing/web-platform/tests/upgrade-insecure-requests/gen/srcdoc-inherit.meta/upgrade/websocket.https.html53
-rw-r--r--testing/web-platform/tests/upgrade-insecure-requests/gen/srcdoc-inherit.meta/upgrade/worker-classic.https.html68
-rw-r--r--testing/web-platform/tests/upgrade-insecure-requests/gen/srcdoc-inherit.meta/upgrade/worker-import-data.https.html113
-rw-r--r--testing/web-platform/tests/upgrade-insecure-requests/gen/srcdoc-inherit.meta/upgrade/worker-import.https.html113
-rw-r--r--testing/web-platform/tests/upgrade-insecure-requests/gen/srcdoc-inherit.meta/upgrade/worker-module.https.html68
-rw-r--r--testing/web-platform/tests/upgrade-insecure-requests/gen/srcdoc-inherit.meta/upgrade/worklet-animation-import-data.https.html113
-rw-r--r--testing/web-platform/tests/upgrade-insecure-requests/gen/srcdoc-inherit.meta/upgrade/worklet-animation.https.html113
-rw-r--r--testing/web-platform/tests/upgrade-insecure-requests/gen/srcdoc-inherit.meta/upgrade/worklet-audio-import-data.https.html113
-rw-r--r--testing/web-platform/tests/upgrade-insecure-requests/gen/srcdoc-inherit.meta/upgrade/worklet-audio.https.html113
-rw-r--r--testing/web-platform/tests/upgrade-insecure-requests/gen/srcdoc-inherit.meta/upgrade/worklet-layout-import-data.https.html113
-rw-r--r--testing/web-platform/tests/upgrade-insecure-requests/gen/srcdoc-inherit.meta/upgrade/worklet-layout.https.html113
-rw-r--r--testing/web-platform/tests/upgrade-insecure-requests/gen/srcdoc-inherit.meta/upgrade/worklet-paint-import-data.https.html113
-rw-r--r--testing/web-platform/tests/upgrade-insecure-requests/gen/srcdoc-inherit.meta/upgrade/worklet-paint.https.html113
-rw-r--r--testing/web-platform/tests/upgrade-insecure-requests/gen/srcdoc-inherit.meta/upgrade/xhr.https.html113
-rw-r--r--testing/web-platform/tests/upgrade-insecure-requests/gen/top.http-rp/upgrade/fetch.https.html82
-rw-r--r--testing/web-platform/tests/upgrade-insecure-requests/gen/top.http-rp/upgrade/fetch.https.html.headers1
-rw-r--r--testing/web-platform/tests/upgrade-insecure-requests/gen/top.http-rp/upgrade/iframe-tag.https.html82
-rw-r--r--testing/web-platform/tests/upgrade-insecure-requests/gen/top.http-rp/upgrade/iframe-tag.https.html.headers1
-rw-r--r--testing/web-platform/tests/upgrade-insecure-requests/gen/top.http-rp/upgrade/img-tag.https.html82
-rw-r--r--testing/web-platform/tests/upgrade-insecure-requests/gen/top.http-rp/upgrade/img-tag.https.html.headers1
-rw-r--r--testing/web-platform/tests/upgrade-insecure-requests/gen/top.http-rp/upgrade/sharedworker-classic.https.html52
-rw-r--r--testing/web-platform/tests/upgrade-insecure-requests/gen/top.http-rp/upgrade/sharedworker-classic.https.html.headers1
-rw-r--r--testing/web-platform/tests/upgrade-insecure-requests/gen/top.http-rp/upgrade/sharedworker-import-data.https.html82
-rw-r--r--testing/web-platform/tests/upgrade-insecure-requests/gen/top.http-rp/upgrade/sharedworker-import-data.https.html.headers1
-rw-r--r--testing/web-platform/tests/upgrade-insecure-requests/gen/top.http-rp/upgrade/sharedworker-import.https.html82
-rw-r--r--testing/web-platform/tests/upgrade-insecure-requests/gen/top.http-rp/upgrade/sharedworker-import.https.html.headers1
-rw-r--r--testing/web-platform/tests/upgrade-insecure-requests/gen/top.http-rp/upgrade/sharedworker-module.https.html52
-rw-r--r--testing/web-platform/tests/upgrade-insecure-requests/gen/top.http-rp/upgrade/sharedworker-module.https.html.headers1
-rw-r--r--testing/web-platform/tests/upgrade-insecure-requests/gen/top.http-rp/upgrade/websocket.https.html42
-rw-r--r--testing/web-platform/tests/upgrade-insecure-requests/gen/top.http-rp/upgrade/websocket.https.html.headers1
-rw-r--r--testing/web-platform/tests/upgrade-insecure-requests/gen/top.http-rp/upgrade/worker-classic.https.html52
-rw-r--r--testing/web-platform/tests/upgrade-insecure-requests/gen/top.http-rp/upgrade/worker-classic.https.html.headers1
-rw-r--r--testing/web-platform/tests/upgrade-insecure-requests/gen/top.http-rp/upgrade/worker-import-data.https.html82
-rw-r--r--testing/web-platform/tests/upgrade-insecure-requests/gen/top.http-rp/upgrade/worker-import-data.https.html.headers1
-rw-r--r--testing/web-platform/tests/upgrade-insecure-requests/gen/top.http-rp/upgrade/worker-import.https.html82
-rw-r--r--testing/web-platform/tests/upgrade-insecure-requests/gen/top.http-rp/upgrade/worker-import.https.html.headers1
-rw-r--r--testing/web-platform/tests/upgrade-insecure-requests/gen/top.http-rp/upgrade/worker-module.https.html52
-rw-r--r--testing/web-platform/tests/upgrade-insecure-requests/gen/top.http-rp/upgrade/worker-module.https.html.headers1
-rw-r--r--testing/web-platform/tests/upgrade-insecure-requests/gen/top.http-rp/upgrade/worklet-animation-import-data.https.html82
-rw-r--r--testing/web-platform/tests/upgrade-insecure-requests/gen/top.http-rp/upgrade/worklet-animation-import-data.https.html.headers1
-rw-r--r--testing/web-platform/tests/upgrade-insecure-requests/gen/top.http-rp/upgrade/worklet-animation.https.html82
-rw-r--r--testing/web-platform/tests/upgrade-insecure-requests/gen/top.http-rp/upgrade/worklet-animation.https.html.headers1
-rw-r--r--testing/web-platform/tests/upgrade-insecure-requests/gen/top.http-rp/upgrade/worklet-audio-import-data.https.html82
-rw-r--r--testing/web-platform/tests/upgrade-insecure-requests/gen/top.http-rp/upgrade/worklet-audio-import-data.https.html.headers1
-rw-r--r--testing/web-platform/tests/upgrade-insecure-requests/gen/top.http-rp/upgrade/worklet-audio.https.html82
-rw-r--r--testing/web-platform/tests/upgrade-insecure-requests/gen/top.http-rp/upgrade/worklet-audio.https.html.headers1
-rw-r--r--testing/web-platform/tests/upgrade-insecure-requests/gen/top.http-rp/upgrade/worklet-layout-import-data.https.html82
-rw-r--r--testing/web-platform/tests/upgrade-insecure-requests/gen/top.http-rp/upgrade/worklet-layout-import-data.https.html.headers1
-rw-r--r--testing/web-platform/tests/upgrade-insecure-requests/gen/top.http-rp/upgrade/worklet-layout.https.html82
-rw-r--r--testing/web-platform/tests/upgrade-insecure-requests/gen/top.http-rp/upgrade/worklet-layout.https.html.headers1
-rw-r--r--testing/web-platform/tests/upgrade-insecure-requests/gen/top.http-rp/upgrade/worklet-paint-import-data.https.html82
-rw-r--r--testing/web-platform/tests/upgrade-insecure-requests/gen/top.http-rp/upgrade/worklet-paint-import-data.https.html.headers1
-rw-r--r--testing/web-platform/tests/upgrade-insecure-requests/gen/top.http-rp/upgrade/worklet-paint.https.html82
-rw-r--r--testing/web-platform/tests/upgrade-insecure-requests/gen/top.http-rp/upgrade/worklet-paint.https.html.headers1
-rw-r--r--testing/web-platform/tests/upgrade-insecure-requests/gen/top.http-rp/upgrade/xhr.https.html82
-rw-r--r--testing/web-platform/tests/upgrade-insecure-requests/gen/top.http-rp/upgrade/xhr.https.html.headers1
-rw-r--r--testing/web-platform/tests/upgrade-insecure-requests/gen/top.meta/unset/fetch.https.html82
-rw-r--r--testing/web-platform/tests/upgrade-insecure-requests/gen/top.meta/unset/iframe-tag.https.html82
-rw-r--r--testing/web-platform/tests/upgrade-insecure-requests/gen/top.meta/unset/img-tag.https.html82
-rw-r--r--testing/web-platform/tests/upgrade-insecure-requests/gen/top.meta/unset/sharedworker-classic.https.html52
-rw-r--r--testing/web-platform/tests/upgrade-insecure-requests/gen/top.meta/unset/sharedworker-import-data.https.html82
-rw-r--r--testing/web-platform/tests/upgrade-insecure-requests/gen/top.meta/unset/sharedworker-import.https.html82
-rw-r--r--testing/web-platform/tests/upgrade-insecure-requests/gen/top.meta/unset/sharedworker-module.https.html52
-rw-r--r--testing/web-platform/tests/upgrade-insecure-requests/gen/top.meta/unset/websocket.https.html42
-rw-r--r--testing/web-platform/tests/upgrade-insecure-requests/gen/top.meta/unset/worker-classic.https.html52
-rw-r--r--testing/web-platform/tests/upgrade-insecure-requests/gen/top.meta/unset/worker-import-data.https.html82
-rw-r--r--testing/web-platform/tests/upgrade-insecure-requests/gen/top.meta/unset/worker-import.https.html82
-rw-r--r--testing/web-platform/tests/upgrade-insecure-requests/gen/top.meta/unset/worker-module.https.html52
-rw-r--r--testing/web-platform/tests/upgrade-insecure-requests/gen/top.meta/unset/worklet-animation-import-data.https.html82
-rw-r--r--testing/web-platform/tests/upgrade-insecure-requests/gen/top.meta/unset/worklet-animation.https.html82
-rw-r--r--testing/web-platform/tests/upgrade-insecure-requests/gen/top.meta/unset/worklet-audio-import-data.https.html82
-rw-r--r--testing/web-platform/tests/upgrade-insecure-requests/gen/top.meta/unset/worklet-audio.https.html82
-rw-r--r--testing/web-platform/tests/upgrade-insecure-requests/gen/top.meta/unset/worklet-layout-import-data.https.html82
-rw-r--r--testing/web-platform/tests/upgrade-insecure-requests/gen/top.meta/unset/worklet-layout.https.html82
-rw-r--r--testing/web-platform/tests/upgrade-insecure-requests/gen/top.meta/unset/worklet-paint-import-data.https.html82
-rw-r--r--testing/web-platform/tests/upgrade-insecure-requests/gen/top.meta/unset/worklet-paint.https.html82
-rw-r--r--testing/web-platform/tests/upgrade-insecure-requests/gen/top.meta/unset/xhr.https.html82
-rw-r--r--testing/web-platform/tests/upgrade-insecure-requests/gen/top.meta/upgrade/fetch.https.html83
-rw-r--r--testing/web-platform/tests/upgrade-insecure-requests/gen/top.meta/upgrade/iframe-tag.https.html83
-rw-r--r--testing/web-platform/tests/upgrade-insecure-requests/gen/top.meta/upgrade/img-tag.https.html83
-rw-r--r--testing/web-platform/tests/upgrade-insecure-requests/gen/top.meta/upgrade/sharedworker-classic.https.html53
-rw-r--r--testing/web-platform/tests/upgrade-insecure-requests/gen/top.meta/upgrade/sharedworker-import-data.https.html83
-rw-r--r--testing/web-platform/tests/upgrade-insecure-requests/gen/top.meta/upgrade/sharedworker-import.https.html83
-rw-r--r--testing/web-platform/tests/upgrade-insecure-requests/gen/top.meta/upgrade/sharedworker-module.https.html53
-rw-r--r--testing/web-platform/tests/upgrade-insecure-requests/gen/top.meta/upgrade/websocket.https.html43
-rw-r--r--testing/web-platform/tests/upgrade-insecure-requests/gen/top.meta/upgrade/worker-classic.https.html53
-rw-r--r--testing/web-platform/tests/upgrade-insecure-requests/gen/top.meta/upgrade/worker-import-data.https.html83
-rw-r--r--testing/web-platform/tests/upgrade-insecure-requests/gen/top.meta/upgrade/worker-import.https.html83
-rw-r--r--testing/web-platform/tests/upgrade-insecure-requests/gen/top.meta/upgrade/worker-module.https.html53
-rw-r--r--testing/web-platform/tests/upgrade-insecure-requests/gen/top.meta/upgrade/worklet-animation-import-data.https.html83
-rw-r--r--testing/web-platform/tests/upgrade-insecure-requests/gen/top.meta/upgrade/worklet-animation.https.html83
-rw-r--r--testing/web-platform/tests/upgrade-insecure-requests/gen/top.meta/upgrade/worklet-audio-import-data.https.html83
-rw-r--r--testing/web-platform/tests/upgrade-insecure-requests/gen/top.meta/upgrade/worklet-audio.https.html83
-rw-r--r--testing/web-platform/tests/upgrade-insecure-requests/gen/top.meta/upgrade/worklet-layout-import-data.https.html83
-rw-r--r--testing/web-platform/tests/upgrade-insecure-requests/gen/top.meta/upgrade/worklet-layout.https.html83
-rw-r--r--testing/web-platform/tests/upgrade-insecure-requests/gen/top.meta/upgrade/worklet-paint-import-data.https.html83
-rw-r--r--testing/web-platform/tests/upgrade-insecure-requests/gen/top.meta/upgrade/worklet-paint.https.html83
-rw-r--r--testing/web-platform/tests/upgrade-insecure-requests/gen/top.meta/upgrade/xhr.https.html83
-rw-r--r--testing/web-platform/tests/upgrade-insecure-requests/gen/worker-classic-data.meta/unset/fetch.https.html112
-rw-r--r--testing/web-platform/tests/upgrade-insecure-requests/gen/worker-classic-data.meta/unset/websocket.https.html52
-rw-r--r--testing/web-platform/tests/upgrade-insecure-requests/gen/worker-classic-data.meta/unset/xhr.https.html112
-rw-r--r--testing/web-platform/tests/upgrade-insecure-requests/gen/worker-classic-data.meta/upgrade/fetch.https.html113
-rw-r--r--testing/web-platform/tests/upgrade-insecure-requests/gen/worker-classic-data.meta/upgrade/websocket.https.html53
-rw-r--r--testing/web-platform/tests/upgrade-insecure-requests/gen/worker-classic-data.meta/upgrade/xhr.https.html113
-rw-r--r--testing/web-platform/tests/upgrade-insecure-requests/gen/worker-classic.http-rp/upgrade/fetch.https.html148
-rw-r--r--testing/web-platform/tests/upgrade-insecure-requests/gen/worker-classic.http-rp/upgrade/websocket.https.html64
-rw-r--r--testing/web-platform/tests/upgrade-insecure-requests/gen/worker-classic.http-rp/upgrade/worker-classic.https.html85
-rw-r--r--testing/web-platform/tests/upgrade-insecure-requests/gen/worker-classic.http-rp/upgrade/worker-module.https.html85
-rw-r--r--testing/web-platform/tests/upgrade-insecure-requests/gen/worker-classic.http-rp/upgrade/xhr.https.html148
-rw-r--r--testing/web-platform/tests/upgrade-insecure-requests/gen/worker-module-data.http-rp/upgrade/fetch.https.html112
-rw-r--r--testing/web-platform/tests/upgrade-insecure-requests/gen/worker-module-data.http-rp/upgrade/fetch.https.html.headers1
-rw-r--r--testing/web-platform/tests/upgrade-insecure-requests/gen/worker-module-data.http-rp/upgrade/websocket.https.html52
-rw-r--r--testing/web-platform/tests/upgrade-insecure-requests/gen/worker-module-data.http-rp/upgrade/websocket.https.html.headers1
-rw-r--r--testing/web-platform/tests/upgrade-insecure-requests/gen/worker-module-data.http-rp/upgrade/xhr.https.html112
-rw-r--r--testing/web-platform/tests/upgrade-insecure-requests/gen/worker-module-data.http-rp/upgrade/xhr.https.html.headers1
-rw-r--r--testing/web-platform/tests/upgrade-insecure-requests/gen/worker-module-data.meta/unset/fetch.https.html112
-rw-r--r--testing/web-platform/tests/upgrade-insecure-requests/gen/worker-module-data.meta/unset/websocket.https.html52
-rw-r--r--testing/web-platform/tests/upgrade-insecure-requests/gen/worker-module-data.meta/unset/xhr.https.html112
-rw-r--r--testing/web-platform/tests/upgrade-insecure-requests/gen/worker-module-data.meta/upgrade/fetch.https.html113
-rw-r--r--testing/web-platform/tests/upgrade-insecure-requests/gen/worker-module-data.meta/upgrade/websocket.https.html53
-rw-r--r--testing/web-platform/tests/upgrade-insecure-requests/gen/worker-module-data.meta/upgrade/xhr.https.html113
-rw-r--r--testing/web-platform/tests/upgrade-insecure-requests/gen/worker-module.http-rp/upgrade/fetch.https.html148
-rw-r--r--testing/web-platform/tests/upgrade-insecure-requests/gen/worker-module.http-rp/upgrade/websocket.https.html64
-rw-r--r--testing/web-platform/tests/upgrade-insecure-requests/gen/worker-module.http-rp/upgrade/worker-classic.https.html85
-rw-r--r--testing/web-platform/tests/upgrade-insecure-requests/gen/worker-module.http-rp/upgrade/worker-module.https.html85
-rw-r--r--testing/web-platform/tests/upgrade-insecure-requests/gen/worker-module.http-rp/upgrade/xhr.https.html148
-rw-r--r--testing/web-platform/tests/upgrade-insecure-requests/generic/test-case.sub.js43
-rw-r--r--testing/web-platform/tests/upgrade-insecure-requests/link-upgrade.sub.https.html65
-rw-r--r--testing/web-platform/tests/upgrade-insecure-requests/link-upgrade/basic-link-no-upgrade.sub.html19
-rw-r--r--testing/web-platform/tests/upgrade-insecure-requests/link-upgrade/basic-link-no-upgrade.sub.html.headers1
-rw-r--r--testing/web-platform/tests/upgrade-insecure-requests/link-upgrade/basic-link-upgrade.sub.html19
-rw-r--r--testing/web-platform/tests/upgrade-insecure-requests/link-upgrade/basic-link-upgrade.sub.html.headers1
-rw-r--r--testing/web-platform/tests/upgrade-insecure-requests/link-upgrade/iframe-link-upgrade.sub.html11
-rw-r--r--testing/web-platform/tests/upgrade-insecure-requests/link-upgrade/iframe-link-upgrade.sub.html.headers1
-rw-r--r--testing/web-platform/tests/upgrade-insecure-requests/link-upgrade/iframe-top-navigation-no-upgrade-1.sub.html16
-rw-r--r--testing/web-platform/tests/upgrade-insecure-requests/link-upgrade/iframe-top-navigation-no-upgrade-1.sub.html.headers1
-rw-r--r--testing/web-platform/tests/upgrade-insecure-requests/link-upgrade/iframe-top-navigation-no-upgrade-2.sub.html16
-rw-r--r--testing/web-platform/tests/upgrade-insecure-requests/link-upgrade/iframe-top-navigation-upgrade-1.sub.html17
-rw-r--r--testing/web-platform/tests/upgrade-insecure-requests/link-upgrade/iframe-top-navigation-upgrade-1.sub.html.headers1
-rw-r--r--testing/web-platform/tests/upgrade-insecure-requests/link-upgrade/iframe-top-navigation-upgrade-2.sub.html17
-rw-r--r--testing/web-platform/tests/upgrade-insecure-requests/link-upgrade/iframe-top-navigation-upgrade-2.sub.html.headers1
-rw-r--r--testing/web-platform/tests/upgrade-insecure-requests/link-upgrade/iframe-top-navigation-upgrade-meta.sub.html31
-rw-r--r--testing/web-platform/tests/upgrade-insecure-requests/link-upgrade/resources/click-on-link.sub.html10
-rw-r--r--testing/web-platform/tests/upgrade-insecure-requests/link-upgrade/resources/dummy.html1
-rw-r--r--testing/web-platform/tests/upgrade-insecure-requests/link-upgrade/resources/navigate-top-frame-upgrade.sub.html5
-rw-r--r--testing/web-platform/tests/upgrade-insecure-requests/link-upgrade/resources/navigate-top-frame-upgrade.sub.html.headers1
-rw-r--r--testing/web-platform/tests/upgrade-insecure-requests/link-upgrade/resources/navigate-top-frame.sub.html5
-rw-r--r--testing/web-platform/tests/upgrade-insecure-requests/link-upgrade/resources/post-message-to-opener.sub.html3
-rw-r--r--testing/web-platform/tests/upgrade-insecure-requests/spec.src.json257
-rw-r--r--testing/web-platform/tests/upgrade-insecure-requests/support/redirect-cors.py5
252 files changed, 18609 insertions, 0 deletions
diff --git a/testing/web-platform/tests/upgrade-insecure-requests/META.yml b/testing/web-platform/tests/upgrade-insecure-requests/META.yml
new file mode 100644
index 0000000000..a30208ae10
--- /dev/null
+++ b/testing/web-platform/tests/upgrade-insecure-requests/META.yml
@@ -0,0 +1,3 @@
+spec: https://w3c.github.io/webappsec-upgrade-insecure-requests/
+suggested_reviewers:
+ - mikewest
diff --git a/testing/web-platform/tests/upgrade-insecure-requests/README.md b/testing/web-platform/tests/upgrade-insecure-requests/README.md
new file mode 100644
index 0000000000..7b7ac65c99
--- /dev/null
+++ b/testing/web-platform/tests/upgrade-insecure-requests/README.md
@@ -0,0 +1,4 @@
+# Upgrade Insecure Requests Test Suite
+
+The subdirectory `gen/` is generated using the generator at `common/security-features`.
+See [common/security-features/README.md](../common/security-features/README.md) for how to generate tests.
diff --git a/testing/web-platform/tests/upgrade-insecure-requests/gen/iframe-blank-inherit.meta/unset/fetch.https.html b/testing/web-platform/tests/upgrade-insecure-requests/gen/iframe-blank-inherit.meta/unset/fetch.https.html
new file mode 100644
index 0000000000..b601fbbf3d
--- /dev/null
+++ b/testing/web-platform/tests/upgrade-insecure-requests/gen/iframe-blank-inherit.meta/unset/fetch.https.html
@@ -0,0 +1,112 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec upgrade-insecure-requests/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "blocked",
+ "origin": "cross-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe-blank"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for fetch to cross-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "cross-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe-blank"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for fetch to cross-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "cross-https",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe-blank"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for fetch to cross-https origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "same-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe-blank"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for fetch to same-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "same-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe-blank"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for fetch to same-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "same-https",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe-blank"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for fetch to same-https origin and downgrade redirection from https context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/upgrade-insecure-requests/gen/iframe-blank-inherit.meta/unset/iframe-tag.https.html b/testing/web-platform/tests/upgrade-insecure-requests/gen/iframe-blank-inherit.meta/unset/iframe-tag.https.html
new file mode 100644
index 0000000000..fbc73e5872
--- /dev/null
+++ b/testing/web-platform/tests/upgrade-insecure-requests/gen/iframe-blank-inherit.meta/unset/iframe-tag.https.html
@@ -0,0 +1,112 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec upgrade-insecure-requests/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "blocked",
+ "origin": "cross-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe-blank"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for iframe-tag to cross-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "cross-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe-blank"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for iframe-tag to cross-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "cross-https",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe-blank"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for iframe-tag to cross-https origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "same-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe-blank"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for iframe-tag to same-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "same-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe-blank"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for iframe-tag to same-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "same-https",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe-blank"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for iframe-tag to same-https origin and downgrade redirection from https context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/upgrade-insecure-requests/gen/iframe-blank-inherit.meta/unset/img-tag.https.html b/testing/web-platform/tests/upgrade-insecure-requests/gen/iframe-blank-inherit.meta/unset/img-tag.https.html
new file mode 100644
index 0000000000..b7b4ba03ee
--- /dev/null
+++ b/testing/web-platform/tests/upgrade-insecure-requests/gen/iframe-blank-inherit.meta/unset/img-tag.https.html
@@ -0,0 +1,112 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec upgrade-insecure-requests/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "blocked",
+ "origin": "cross-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe-blank"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for img-tag to cross-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "cross-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe-blank"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for img-tag to cross-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "cross-https",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe-blank"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for img-tag to cross-https origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "same-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe-blank"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for img-tag to same-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "same-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe-blank"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for img-tag to same-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "same-https",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe-blank"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for img-tag to same-https origin and downgrade redirection from https context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/upgrade-insecure-requests/gen/iframe-blank-inherit.meta/unset/sharedworker-classic.https.html b/testing/web-platform/tests/upgrade-insecure-requests/gen/iframe-blank-inherit.meta/unset/sharedworker-classic.https.html
new file mode 100644
index 0000000000..3d9fc6eeb9
--- /dev/null
+++ b/testing/web-platform/tests/upgrade-insecure-requests/gen/iframe-blank-inherit.meta/unset/sharedworker-classic.https.html
@@ -0,0 +1,67 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec upgrade-insecure-requests/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "blocked",
+ "origin": "same-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe-blank"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "sharedworker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for sharedworker-classic to same-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "same-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe-blank"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "sharedworker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for sharedworker-classic to same-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "same-https",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe-blank"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "sharedworker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for sharedworker-classic to same-https origin and downgrade redirection from https context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/upgrade-insecure-requests/gen/iframe-blank-inherit.meta/unset/sharedworker-import-data.https.html b/testing/web-platform/tests/upgrade-insecure-requests/gen/iframe-blank-inherit.meta/unset/sharedworker-import-data.https.html
new file mode 100644
index 0000000000..0f345eb901
--- /dev/null
+++ b/testing/web-platform/tests/upgrade-insecure-requests/gen/iframe-blank-inherit.meta/unset/sharedworker-import-data.https.html
@@ -0,0 +1,112 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec upgrade-insecure-requests/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "blocked",
+ "origin": "cross-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe-blank"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "sharedworker-import-data",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for sharedworker-import-data to cross-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "cross-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe-blank"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "sharedworker-import-data",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for sharedworker-import-data to cross-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "cross-https",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe-blank"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "sharedworker-import-data",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for sharedworker-import-data to cross-https origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "same-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe-blank"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "sharedworker-import-data",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for sharedworker-import-data to same-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "same-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe-blank"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "sharedworker-import-data",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for sharedworker-import-data to same-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "same-https",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe-blank"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "sharedworker-import-data",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for sharedworker-import-data to same-https origin and downgrade redirection from https context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/upgrade-insecure-requests/gen/iframe-blank-inherit.meta/unset/sharedworker-import.https.html b/testing/web-platform/tests/upgrade-insecure-requests/gen/iframe-blank-inherit.meta/unset/sharedworker-import.https.html
new file mode 100644
index 0000000000..70ccb7af79
--- /dev/null
+++ b/testing/web-platform/tests/upgrade-insecure-requests/gen/iframe-blank-inherit.meta/unset/sharedworker-import.https.html
@@ -0,0 +1,112 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec upgrade-insecure-requests/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "blocked",
+ "origin": "cross-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe-blank"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "sharedworker-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for sharedworker-import to cross-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "cross-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe-blank"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "sharedworker-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for sharedworker-import to cross-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "cross-https",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe-blank"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "sharedworker-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for sharedworker-import to cross-https origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "same-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe-blank"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "sharedworker-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for sharedworker-import to same-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "same-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe-blank"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "sharedworker-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for sharedworker-import to same-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "same-https",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe-blank"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "sharedworker-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for sharedworker-import to same-https origin and downgrade redirection from https context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/upgrade-insecure-requests/gen/iframe-blank-inherit.meta/unset/sharedworker-module.https.html b/testing/web-platform/tests/upgrade-insecure-requests/gen/iframe-blank-inherit.meta/unset/sharedworker-module.https.html
new file mode 100644
index 0000000000..c58a8b741c
--- /dev/null
+++ b/testing/web-platform/tests/upgrade-insecure-requests/gen/iframe-blank-inherit.meta/unset/sharedworker-module.https.html
@@ -0,0 +1,67 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec upgrade-insecure-requests/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "blocked",
+ "origin": "same-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe-blank"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "sharedworker-module",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for sharedworker-module to same-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "same-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe-blank"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "sharedworker-module",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for sharedworker-module to same-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "same-https",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe-blank"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "sharedworker-module",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for sharedworker-module to same-https origin and downgrade redirection from https context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/upgrade-insecure-requests/gen/iframe-blank-inherit.meta/unset/websocket.https.html b/testing/web-platform/tests/upgrade-insecure-requests/gen/iframe-blank-inherit.meta/unset/websocket.https.html
new file mode 100644
index 0000000000..a053ac832c
--- /dev/null
+++ b/testing/web-platform/tests/upgrade-insecure-requests/gen/iframe-blank-inherit.meta/unset/websocket.https.html
@@ -0,0 +1,52 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec upgrade-insecure-requests/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "blocked",
+ "origin": "cross-ws-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe-blank"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "websocket",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for websocket to cross-ws-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "same-ws-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe-blank"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "websocket",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for websocket to same-ws-downgrade origin and no-redirect redirection from https context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/upgrade-insecure-requests/gen/iframe-blank-inherit.meta/unset/worker-classic.https.html b/testing/web-platform/tests/upgrade-insecure-requests/gen/iframe-blank-inherit.meta/unset/worker-classic.https.html
new file mode 100644
index 0000000000..abc67d7502
--- /dev/null
+++ b/testing/web-platform/tests/upgrade-insecure-requests/gen/iframe-blank-inherit.meta/unset/worker-classic.https.html
@@ -0,0 +1,67 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec upgrade-insecure-requests/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "blocked",
+ "origin": "same-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe-blank"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "worker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for worker-classic to same-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "same-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe-blank"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "worker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for worker-classic to same-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "same-https",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe-blank"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "worker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for worker-classic to same-https origin and downgrade redirection from https context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/upgrade-insecure-requests/gen/iframe-blank-inherit.meta/unset/worker-import-data.https.html b/testing/web-platform/tests/upgrade-insecure-requests/gen/iframe-blank-inherit.meta/unset/worker-import-data.https.html
new file mode 100644
index 0000000000..f61176cda2
--- /dev/null
+++ b/testing/web-platform/tests/upgrade-insecure-requests/gen/iframe-blank-inherit.meta/unset/worker-import-data.https.html
@@ -0,0 +1,112 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec upgrade-insecure-requests/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "blocked",
+ "origin": "cross-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe-blank"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "worker-import-data",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for worker-import-data to cross-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "cross-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe-blank"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "worker-import-data",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for worker-import-data to cross-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "cross-https",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe-blank"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "worker-import-data",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for worker-import-data to cross-https origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "same-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe-blank"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "worker-import-data",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for worker-import-data to same-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "same-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe-blank"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "worker-import-data",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for worker-import-data to same-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "same-https",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe-blank"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "worker-import-data",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for worker-import-data to same-https origin and downgrade redirection from https context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/upgrade-insecure-requests/gen/iframe-blank-inherit.meta/unset/worker-import.https.html b/testing/web-platform/tests/upgrade-insecure-requests/gen/iframe-blank-inherit.meta/unset/worker-import.https.html
new file mode 100644
index 0000000000..d9f3a8cd23
--- /dev/null
+++ b/testing/web-platform/tests/upgrade-insecure-requests/gen/iframe-blank-inherit.meta/unset/worker-import.https.html
@@ -0,0 +1,112 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec upgrade-insecure-requests/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "blocked",
+ "origin": "cross-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe-blank"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "worker-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for worker-import to cross-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "cross-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe-blank"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "worker-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for worker-import to cross-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "cross-https",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe-blank"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "worker-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for worker-import to cross-https origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "same-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe-blank"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "worker-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for worker-import to same-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "same-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe-blank"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "worker-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for worker-import to same-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "same-https",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe-blank"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "worker-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for worker-import to same-https origin and downgrade redirection from https context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/upgrade-insecure-requests/gen/iframe-blank-inherit.meta/unset/worker-module.https.html b/testing/web-platform/tests/upgrade-insecure-requests/gen/iframe-blank-inherit.meta/unset/worker-module.https.html
new file mode 100644
index 0000000000..e82a6917d9
--- /dev/null
+++ b/testing/web-platform/tests/upgrade-insecure-requests/gen/iframe-blank-inherit.meta/unset/worker-module.https.html
@@ -0,0 +1,67 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec upgrade-insecure-requests/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "blocked",
+ "origin": "same-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe-blank"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "worker-module",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for worker-module to same-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "same-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe-blank"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "worker-module",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for worker-module to same-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "same-https",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe-blank"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "worker-module",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for worker-module to same-https origin and downgrade redirection from https context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/upgrade-insecure-requests/gen/iframe-blank-inherit.meta/unset/worklet-animation-import-data.https.html b/testing/web-platform/tests/upgrade-insecure-requests/gen/iframe-blank-inherit.meta/unset/worklet-animation-import-data.https.html
new file mode 100644
index 0000000000..7b54ed289e
--- /dev/null
+++ b/testing/web-platform/tests/upgrade-insecure-requests/gen/iframe-blank-inherit.meta/unset/worklet-animation-import-data.https.html
@@ -0,0 +1,112 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec upgrade-insecure-requests/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "blocked",
+ "origin": "cross-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe-blank"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "worklet-animation-import-data",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for worklet-animation-import-data to cross-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "cross-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe-blank"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "worklet-animation-import-data",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for worklet-animation-import-data to cross-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "cross-https",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe-blank"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "worklet-animation-import-data",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for worklet-animation-import-data to cross-https origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "same-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe-blank"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "worklet-animation-import-data",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for worklet-animation-import-data to same-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "same-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe-blank"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "worklet-animation-import-data",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for worklet-animation-import-data to same-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "same-https",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe-blank"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "worklet-animation-import-data",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for worklet-animation-import-data to same-https origin and downgrade redirection from https context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/upgrade-insecure-requests/gen/iframe-blank-inherit.meta/unset/worklet-animation.https.html b/testing/web-platform/tests/upgrade-insecure-requests/gen/iframe-blank-inherit.meta/unset/worklet-animation.https.html
new file mode 100644
index 0000000000..1d7e1fe598
--- /dev/null
+++ b/testing/web-platform/tests/upgrade-insecure-requests/gen/iframe-blank-inherit.meta/unset/worklet-animation.https.html
@@ -0,0 +1,112 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec upgrade-insecure-requests/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "blocked",
+ "origin": "cross-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe-blank"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "worklet-animation",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for worklet-animation to cross-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "cross-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe-blank"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "worklet-animation",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for worklet-animation to cross-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "cross-https",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe-blank"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "worklet-animation",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for worklet-animation to cross-https origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "same-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe-blank"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "worklet-animation",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for worklet-animation to same-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "same-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe-blank"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "worklet-animation",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for worklet-animation to same-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "same-https",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe-blank"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "worklet-animation",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for worklet-animation to same-https origin and downgrade redirection from https context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/upgrade-insecure-requests/gen/iframe-blank-inherit.meta/unset/worklet-audio-import-data.https.html b/testing/web-platform/tests/upgrade-insecure-requests/gen/iframe-blank-inherit.meta/unset/worklet-audio-import-data.https.html
new file mode 100644
index 0000000000..81a4e8a2f8
--- /dev/null
+++ b/testing/web-platform/tests/upgrade-insecure-requests/gen/iframe-blank-inherit.meta/unset/worklet-audio-import-data.https.html
@@ -0,0 +1,112 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec upgrade-insecure-requests/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "blocked",
+ "origin": "cross-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe-blank"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "worklet-audio-import-data",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for worklet-audio-import-data to cross-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "cross-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe-blank"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "worklet-audio-import-data",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for worklet-audio-import-data to cross-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "cross-https",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe-blank"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "worklet-audio-import-data",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for worklet-audio-import-data to cross-https origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "same-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe-blank"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "worklet-audio-import-data",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for worklet-audio-import-data to same-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "same-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe-blank"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "worklet-audio-import-data",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for worklet-audio-import-data to same-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "same-https",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe-blank"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "worklet-audio-import-data",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for worklet-audio-import-data to same-https origin and downgrade redirection from https context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/upgrade-insecure-requests/gen/iframe-blank-inherit.meta/unset/worklet-audio.https.html b/testing/web-platform/tests/upgrade-insecure-requests/gen/iframe-blank-inherit.meta/unset/worklet-audio.https.html
new file mode 100644
index 0000000000..0aed1e59ac
--- /dev/null
+++ b/testing/web-platform/tests/upgrade-insecure-requests/gen/iframe-blank-inherit.meta/unset/worklet-audio.https.html
@@ -0,0 +1,112 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec upgrade-insecure-requests/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "blocked",
+ "origin": "cross-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe-blank"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "worklet-audio",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for worklet-audio to cross-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "cross-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe-blank"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "worklet-audio",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for worklet-audio to cross-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "cross-https",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe-blank"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "worklet-audio",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for worklet-audio to cross-https origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "same-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe-blank"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "worklet-audio",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for worklet-audio to same-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "same-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe-blank"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "worklet-audio",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for worklet-audio to same-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "same-https",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe-blank"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "worklet-audio",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for worklet-audio to same-https origin and downgrade redirection from https context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/upgrade-insecure-requests/gen/iframe-blank-inherit.meta/unset/worklet-layout-import-data.https.html b/testing/web-platform/tests/upgrade-insecure-requests/gen/iframe-blank-inherit.meta/unset/worklet-layout-import-data.https.html
new file mode 100644
index 0000000000..c143066c78
--- /dev/null
+++ b/testing/web-platform/tests/upgrade-insecure-requests/gen/iframe-blank-inherit.meta/unset/worklet-layout-import-data.https.html
@@ -0,0 +1,112 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec upgrade-insecure-requests/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "blocked",
+ "origin": "cross-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe-blank"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "worklet-layout-import-data",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for worklet-layout-import-data to cross-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "cross-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe-blank"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "worklet-layout-import-data",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for worklet-layout-import-data to cross-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "cross-https",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe-blank"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "worklet-layout-import-data",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for worklet-layout-import-data to cross-https origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "same-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe-blank"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "worklet-layout-import-data",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for worklet-layout-import-data to same-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "same-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe-blank"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "worklet-layout-import-data",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for worklet-layout-import-data to same-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "same-https",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe-blank"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "worklet-layout-import-data",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for worklet-layout-import-data to same-https origin and downgrade redirection from https context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/upgrade-insecure-requests/gen/iframe-blank-inherit.meta/unset/worklet-layout.https.html b/testing/web-platform/tests/upgrade-insecure-requests/gen/iframe-blank-inherit.meta/unset/worklet-layout.https.html
new file mode 100644
index 0000000000..3095104f85
--- /dev/null
+++ b/testing/web-platform/tests/upgrade-insecure-requests/gen/iframe-blank-inherit.meta/unset/worklet-layout.https.html
@@ -0,0 +1,112 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec upgrade-insecure-requests/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "blocked",
+ "origin": "cross-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe-blank"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "worklet-layout",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for worklet-layout to cross-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "cross-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe-blank"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "worklet-layout",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for worklet-layout to cross-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "cross-https",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe-blank"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "worklet-layout",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for worklet-layout to cross-https origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "same-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe-blank"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "worklet-layout",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for worklet-layout to same-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "same-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe-blank"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "worklet-layout",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for worklet-layout to same-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "same-https",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe-blank"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "worklet-layout",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for worklet-layout to same-https origin and downgrade redirection from https context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/upgrade-insecure-requests/gen/iframe-blank-inherit.meta/unset/worklet-paint-import-data.https.html b/testing/web-platform/tests/upgrade-insecure-requests/gen/iframe-blank-inherit.meta/unset/worklet-paint-import-data.https.html
new file mode 100644
index 0000000000..c7d7f35d13
--- /dev/null
+++ b/testing/web-platform/tests/upgrade-insecure-requests/gen/iframe-blank-inherit.meta/unset/worklet-paint-import-data.https.html
@@ -0,0 +1,112 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec upgrade-insecure-requests/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "blocked",
+ "origin": "cross-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe-blank"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "worklet-paint-import-data",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for worklet-paint-import-data to cross-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "cross-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe-blank"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "worklet-paint-import-data",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for worklet-paint-import-data to cross-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "cross-https",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe-blank"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "worklet-paint-import-data",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for worklet-paint-import-data to cross-https origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "same-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe-blank"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "worklet-paint-import-data",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for worklet-paint-import-data to same-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "same-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe-blank"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "worklet-paint-import-data",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for worklet-paint-import-data to same-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "same-https",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe-blank"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "worklet-paint-import-data",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for worklet-paint-import-data to same-https origin and downgrade redirection from https context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/upgrade-insecure-requests/gen/iframe-blank-inherit.meta/unset/worklet-paint.https.html b/testing/web-platform/tests/upgrade-insecure-requests/gen/iframe-blank-inherit.meta/unset/worklet-paint.https.html
new file mode 100644
index 0000000000..43892ec284
--- /dev/null
+++ b/testing/web-platform/tests/upgrade-insecure-requests/gen/iframe-blank-inherit.meta/unset/worklet-paint.https.html
@@ -0,0 +1,112 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec upgrade-insecure-requests/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "blocked",
+ "origin": "cross-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe-blank"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "worklet-paint",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for worklet-paint to cross-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "cross-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe-blank"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "worklet-paint",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for worklet-paint to cross-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "cross-https",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe-blank"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "worklet-paint",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for worklet-paint to cross-https origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "same-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe-blank"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "worklet-paint",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for worklet-paint to same-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "same-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe-blank"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "worklet-paint",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for worklet-paint to same-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "same-https",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe-blank"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "worklet-paint",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for worklet-paint to same-https origin and downgrade redirection from https context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/upgrade-insecure-requests/gen/iframe-blank-inherit.meta/unset/xhr.https.html b/testing/web-platform/tests/upgrade-insecure-requests/gen/iframe-blank-inherit.meta/unset/xhr.https.html
new file mode 100644
index 0000000000..dd17493029
--- /dev/null
+++ b/testing/web-platform/tests/upgrade-insecure-requests/gen/iframe-blank-inherit.meta/unset/xhr.https.html
@@ -0,0 +1,112 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec upgrade-insecure-requests/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "blocked",
+ "origin": "cross-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe-blank"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for xhr to cross-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "cross-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe-blank"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for xhr to cross-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "cross-https",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe-blank"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for xhr to cross-https origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "same-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe-blank"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for xhr to same-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "same-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe-blank"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for xhr to same-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "same-https",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe-blank"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for xhr to same-https origin and downgrade redirection from https context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/upgrade-insecure-requests/gen/iframe-blank-inherit.meta/upgrade/fetch.https.html b/testing/web-platform/tests/upgrade-insecure-requests/gen/iframe-blank-inherit.meta/upgrade/fetch.https.html
new file mode 100644
index 0000000000..24d3ed9946
--- /dev/null
+++ b/testing/web-platform/tests/upgrade-insecure-requests/gen/iframe-blank-inherit.meta/upgrade/fetch.https.html
@@ -0,0 +1,113 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec upgrade-insecure-requests/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "allowed",
+ "origin": "cross-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe-blank"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for fetch to cross-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "cross-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe-blank"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for fetch to cross-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "cross-https",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe-blank"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for fetch to cross-https origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe-blank"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for fetch to same-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe-blank"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for fetch to same-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-https",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe-blank"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for fetch to same-https origin and downgrade redirection from https context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/upgrade-insecure-requests/gen/iframe-blank-inherit.meta/upgrade/iframe-tag.https.html b/testing/web-platform/tests/upgrade-insecure-requests/gen/iframe-blank-inherit.meta/upgrade/iframe-tag.https.html
new file mode 100644
index 0000000000..57fec0607e
--- /dev/null
+++ b/testing/web-platform/tests/upgrade-insecure-requests/gen/iframe-blank-inherit.meta/upgrade/iframe-tag.https.html
@@ -0,0 +1,113 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec upgrade-insecure-requests/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "allowed",
+ "origin": "cross-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe-blank"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for iframe-tag to cross-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "cross-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe-blank"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for iframe-tag to cross-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "cross-https",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe-blank"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for iframe-tag to cross-https origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe-blank"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for iframe-tag to same-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe-blank"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for iframe-tag to same-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-https",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe-blank"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for iframe-tag to same-https origin and downgrade redirection from https context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/upgrade-insecure-requests/gen/iframe-blank-inherit.meta/upgrade/img-tag.https.html b/testing/web-platform/tests/upgrade-insecure-requests/gen/iframe-blank-inherit.meta/upgrade/img-tag.https.html
new file mode 100644
index 0000000000..0639eb49fc
--- /dev/null
+++ b/testing/web-platform/tests/upgrade-insecure-requests/gen/iframe-blank-inherit.meta/upgrade/img-tag.https.html
@@ -0,0 +1,113 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec upgrade-insecure-requests/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "allowed",
+ "origin": "cross-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe-blank"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for img-tag to cross-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "cross-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe-blank"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for img-tag to cross-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "cross-https",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe-blank"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for img-tag to cross-https origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe-blank"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for img-tag to same-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe-blank"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for img-tag to same-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-https",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe-blank"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for img-tag to same-https origin and downgrade redirection from https context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/upgrade-insecure-requests/gen/iframe-blank-inherit.meta/upgrade/sharedworker-classic.https.html b/testing/web-platform/tests/upgrade-insecure-requests/gen/iframe-blank-inherit.meta/upgrade/sharedworker-classic.https.html
new file mode 100644
index 0000000000..5e59b508df
--- /dev/null
+++ b/testing/web-platform/tests/upgrade-insecure-requests/gen/iframe-blank-inherit.meta/upgrade/sharedworker-classic.https.html
@@ -0,0 +1,68 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec upgrade-insecure-requests/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "allowed",
+ "origin": "same-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe-blank"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "sharedworker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for sharedworker-classic to same-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe-blank"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "sharedworker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for sharedworker-classic to same-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-https",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe-blank"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "sharedworker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for sharedworker-classic to same-https origin and downgrade redirection from https context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/upgrade-insecure-requests/gen/iframe-blank-inherit.meta/upgrade/sharedworker-import-data.https.html b/testing/web-platform/tests/upgrade-insecure-requests/gen/iframe-blank-inherit.meta/upgrade/sharedworker-import-data.https.html
new file mode 100644
index 0000000000..6132933adf
--- /dev/null
+++ b/testing/web-platform/tests/upgrade-insecure-requests/gen/iframe-blank-inherit.meta/upgrade/sharedworker-import-data.https.html
@@ -0,0 +1,113 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec upgrade-insecure-requests/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "allowed",
+ "origin": "cross-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe-blank"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "sharedworker-import-data",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for sharedworker-import-data to cross-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "cross-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe-blank"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "sharedworker-import-data",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for sharedworker-import-data to cross-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "cross-https",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe-blank"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "sharedworker-import-data",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for sharedworker-import-data to cross-https origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe-blank"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "sharedworker-import-data",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for sharedworker-import-data to same-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe-blank"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "sharedworker-import-data",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for sharedworker-import-data to same-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-https",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe-blank"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "sharedworker-import-data",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for sharedworker-import-data to same-https origin and downgrade redirection from https context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/upgrade-insecure-requests/gen/iframe-blank-inherit.meta/upgrade/sharedworker-import.https.html b/testing/web-platform/tests/upgrade-insecure-requests/gen/iframe-blank-inherit.meta/upgrade/sharedworker-import.https.html
new file mode 100644
index 0000000000..23ccc739e9
--- /dev/null
+++ b/testing/web-platform/tests/upgrade-insecure-requests/gen/iframe-blank-inherit.meta/upgrade/sharedworker-import.https.html
@@ -0,0 +1,113 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec upgrade-insecure-requests/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "allowed",
+ "origin": "cross-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe-blank"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "sharedworker-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for sharedworker-import to cross-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "cross-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe-blank"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "sharedworker-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for sharedworker-import to cross-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "cross-https",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe-blank"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "sharedworker-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for sharedworker-import to cross-https origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe-blank"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "sharedworker-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for sharedworker-import to same-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe-blank"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "sharedworker-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for sharedworker-import to same-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-https",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe-blank"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "sharedworker-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for sharedworker-import to same-https origin and downgrade redirection from https context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/upgrade-insecure-requests/gen/iframe-blank-inherit.meta/upgrade/sharedworker-module.https.html b/testing/web-platform/tests/upgrade-insecure-requests/gen/iframe-blank-inherit.meta/upgrade/sharedworker-module.https.html
new file mode 100644
index 0000000000..2d48b7037b
--- /dev/null
+++ b/testing/web-platform/tests/upgrade-insecure-requests/gen/iframe-blank-inherit.meta/upgrade/sharedworker-module.https.html
@@ -0,0 +1,68 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec upgrade-insecure-requests/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "allowed",
+ "origin": "same-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe-blank"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "sharedworker-module",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for sharedworker-module to same-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe-blank"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "sharedworker-module",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for sharedworker-module to same-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-https",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe-blank"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "sharedworker-module",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for sharedworker-module to same-https origin and downgrade redirection from https context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/upgrade-insecure-requests/gen/iframe-blank-inherit.meta/upgrade/websocket.https.html b/testing/web-platform/tests/upgrade-insecure-requests/gen/iframe-blank-inherit.meta/upgrade/websocket.https.html
new file mode 100644
index 0000000000..a2e6ad6caf
--- /dev/null
+++ b/testing/web-platform/tests/upgrade-insecure-requests/gen/iframe-blank-inherit.meta/upgrade/websocket.https.html
@@ -0,0 +1,53 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec upgrade-insecure-requests/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "allowed",
+ "origin": "cross-ws-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe-blank"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "websocket",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for websocket to cross-ws-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-ws-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe-blank"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "websocket",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for websocket to same-ws-downgrade origin and no-redirect redirection from https context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/upgrade-insecure-requests/gen/iframe-blank-inherit.meta/upgrade/worker-classic.https.html b/testing/web-platform/tests/upgrade-insecure-requests/gen/iframe-blank-inherit.meta/upgrade/worker-classic.https.html
new file mode 100644
index 0000000000..b707f78738
--- /dev/null
+++ b/testing/web-platform/tests/upgrade-insecure-requests/gen/iframe-blank-inherit.meta/upgrade/worker-classic.https.html
@@ -0,0 +1,68 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec upgrade-insecure-requests/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "allowed",
+ "origin": "same-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe-blank"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "worker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for worker-classic to same-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe-blank"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "worker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for worker-classic to same-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-https",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe-blank"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "worker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for worker-classic to same-https origin and downgrade redirection from https context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/upgrade-insecure-requests/gen/iframe-blank-inherit.meta/upgrade/worker-import-data.https.html b/testing/web-platform/tests/upgrade-insecure-requests/gen/iframe-blank-inherit.meta/upgrade/worker-import-data.https.html
new file mode 100644
index 0000000000..d66684ecee
--- /dev/null
+++ b/testing/web-platform/tests/upgrade-insecure-requests/gen/iframe-blank-inherit.meta/upgrade/worker-import-data.https.html
@@ -0,0 +1,113 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec upgrade-insecure-requests/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "allowed",
+ "origin": "cross-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe-blank"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "worker-import-data",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for worker-import-data to cross-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "cross-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe-blank"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "worker-import-data",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for worker-import-data to cross-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "cross-https",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe-blank"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "worker-import-data",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for worker-import-data to cross-https origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe-blank"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "worker-import-data",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for worker-import-data to same-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe-blank"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "worker-import-data",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for worker-import-data to same-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-https",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe-blank"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "worker-import-data",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for worker-import-data to same-https origin and downgrade redirection from https context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/upgrade-insecure-requests/gen/iframe-blank-inherit.meta/upgrade/worker-import.https.html b/testing/web-platform/tests/upgrade-insecure-requests/gen/iframe-blank-inherit.meta/upgrade/worker-import.https.html
new file mode 100644
index 0000000000..17a9e12250
--- /dev/null
+++ b/testing/web-platform/tests/upgrade-insecure-requests/gen/iframe-blank-inherit.meta/upgrade/worker-import.https.html
@@ -0,0 +1,113 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec upgrade-insecure-requests/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "allowed",
+ "origin": "cross-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe-blank"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "worker-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for worker-import to cross-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "cross-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe-blank"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "worker-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for worker-import to cross-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "cross-https",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe-blank"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "worker-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for worker-import to cross-https origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe-blank"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "worker-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for worker-import to same-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe-blank"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "worker-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for worker-import to same-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-https",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe-blank"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "worker-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for worker-import to same-https origin and downgrade redirection from https context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/upgrade-insecure-requests/gen/iframe-blank-inherit.meta/upgrade/worker-module.https.html b/testing/web-platform/tests/upgrade-insecure-requests/gen/iframe-blank-inherit.meta/upgrade/worker-module.https.html
new file mode 100644
index 0000000000..2207fcded2
--- /dev/null
+++ b/testing/web-platform/tests/upgrade-insecure-requests/gen/iframe-blank-inherit.meta/upgrade/worker-module.https.html
@@ -0,0 +1,68 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec upgrade-insecure-requests/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "allowed",
+ "origin": "same-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe-blank"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "worker-module",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for worker-module to same-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe-blank"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "worker-module",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for worker-module to same-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-https",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe-blank"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "worker-module",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for worker-module to same-https origin and downgrade redirection from https context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/upgrade-insecure-requests/gen/iframe-blank-inherit.meta/upgrade/worklet-animation-import-data.https.html b/testing/web-platform/tests/upgrade-insecure-requests/gen/iframe-blank-inherit.meta/upgrade/worklet-animation-import-data.https.html
new file mode 100644
index 0000000000..78b39da45b
--- /dev/null
+++ b/testing/web-platform/tests/upgrade-insecure-requests/gen/iframe-blank-inherit.meta/upgrade/worklet-animation-import-data.https.html
@@ -0,0 +1,113 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec upgrade-insecure-requests/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "allowed",
+ "origin": "cross-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe-blank"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "worklet-animation-import-data",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for worklet-animation-import-data to cross-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "cross-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe-blank"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "worklet-animation-import-data",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for worklet-animation-import-data to cross-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "cross-https",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe-blank"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "worklet-animation-import-data",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for worklet-animation-import-data to cross-https origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe-blank"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "worklet-animation-import-data",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for worklet-animation-import-data to same-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe-blank"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "worklet-animation-import-data",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for worklet-animation-import-data to same-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-https",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe-blank"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "worklet-animation-import-data",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for worklet-animation-import-data to same-https origin and downgrade redirection from https context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/upgrade-insecure-requests/gen/iframe-blank-inherit.meta/upgrade/worklet-animation.https.html b/testing/web-platform/tests/upgrade-insecure-requests/gen/iframe-blank-inherit.meta/upgrade/worklet-animation.https.html
new file mode 100644
index 0000000000..b560ec687e
--- /dev/null
+++ b/testing/web-platform/tests/upgrade-insecure-requests/gen/iframe-blank-inherit.meta/upgrade/worklet-animation.https.html
@@ -0,0 +1,113 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec upgrade-insecure-requests/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "allowed",
+ "origin": "cross-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe-blank"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "worklet-animation",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for worklet-animation to cross-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "cross-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe-blank"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "worklet-animation",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for worklet-animation to cross-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "cross-https",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe-blank"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "worklet-animation",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for worklet-animation to cross-https origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe-blank"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "worklet-animation",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for worklet-animation to same-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe-blank"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "worklet-animation",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for worklet-animation to same-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-https",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe-blank"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "worklet-animation",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for worklet-animation to same-https origin and downgrade redirection from https context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/upgrade-insecure-requests/gen/iframe-blank-inherit.meta/upgrade/worklet-audio-import-data.https.html b/testing/web-platform/tests/upgrade-insecure-requests/gen/iframe-blank-inherit.meta/upgrade/worklet-audio-import-data.https.html
new file mode 100644
index 0000000000..4098618e82
--- /dev/null
+++ b/testing/web-platform/tests/upgrade-insecure-requests/gen/iframe-blank-inherit.meta/upgrade/worklet-audio-import-data.https.html
@@ -0,0 +1,113 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec upgrade-insecure-requests/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "allowed",
+ "origin": "cross-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe-blank"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "worklet-audio-import-data",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for worklet-audio-import-data to cross-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "cross-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe-blank"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "worklet-audio-import-data",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for worklet-audio-import-data to cross-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "cross-https",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe-blank"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "worklet-audio-import-data",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for worklet-audio-import-data to cross-https origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe-blank"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "worklet-audio-import-data",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for worklet-audio-import-data to same-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe-blank"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "worklet-audio-import-data",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for worklet-audio-import-data to same-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-https",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe-blank"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "worklet-audio-import-data",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for worklet-audio-import-data to same-https origin and downgrade redirection from https context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/upgrade-insecure-requests/gen/iframe-blank-inherit.meta/upgrade/worklet-audio.https.html b/testing/web-platform/tests/upgrade-insecure-requests/gen/iframe-blank-inherit.meta/upgrade/worklet-audio.https.html
new file mode 100644
index 0000000000..9dd58b98ab
--- /dev/null
+++ b/testing/web-platform/tests/upgrade-insecure-requests/gen/iframe-blank-inherit.meta/upgrade/worklet-audio.https.html
@@ -0,0 +1,113 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec upgrade-insecure-requests/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "allowed",
+ "origin": "cross-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe-blank"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "worklet-audio",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for worklet-audio to cross-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "cross-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe-blank"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "worklet-audio",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for worklet-audio to cross-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "cross-https",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe-blank"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "worklet-audio",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for worklet-audio to cross-https origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe-blank"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "worklet-audio",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for worklet-audio to same-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe-blank"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "worklet-audio",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for worklet-audio to same-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-https",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe-blank"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "worklet-audio",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for worklet-audio to same-https origin and downgrade redirection from https context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/upgrade-insecure-requests/gen/iframe-blank-inherit.meta/upgrade/worklet-layout-import-data.https.html b/testing/web-platform/tests/upgrade-insecure-requests/gen/iframe-blank-inherit.meta/upgrade/worklet-layout-import-data.https.html
new file mode 100644
index 0000000000..5690227c43
--- /dev/null
+++ b/testing/web-platform/tests/upgrade-insecure-requests/gen/iframe-blank-inherit.meta/upgrade/worklet-layout-import-data.https.html
@@ -0,0 +1,113 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec upgrade-insecure-requests/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "allowed",
+ "origin": "cross-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe-blank"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "worklet-layout-import-data",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for worklet-layout-import-data to cross-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "cross-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe-blank"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "worklet-layout-import-data",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for worklet-layout-import-data to cross-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "cross-https",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe-blank"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "worklet-layout-import-data",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for worklet-layout-import-data to cross-https origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe-blank"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "worklet-layout-import-data",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for worklet-layout-import-data to same-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe-blank"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "worklet-layout-import-data",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for worklet-layout-import-data to same-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-https",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe-blank"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "worklet-layout-import-data",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for worklet-layout-import-data to same-https origin and downgrade redirection from https context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/upgrade-insecure-requests/gen/iframe-blank-inherit.meta/upgrade/worklet-layout.https.html b/testing/web-platform/tests/upgrade-insecure-requests/gen/iframe-blank-inherit.meta/upgrade/worklet-layout.https.html
new file mode 100644
index 0000000000..07aecb6743
--- /dev/null
+++ b/testing/web-platform/tests/upgrade-insecure-requests/gen/iframe-blank-inherit.meta/upgrade/worklet-layout.https.html
@@ -0,0 +1,113 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec upgrade-insecure-requests/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "allowed",
+ "origin": "cross-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe-blank"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "worklet-layout",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for worklet-layout to cross-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "cross-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe-blank"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "worklet-layout",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for worklet-layout to cross-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "cross-https",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe-blank"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "worklet-layout",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for worklet-layout to cross-https origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe-blank"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "worklet-layout",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for worklet-layout to same-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe-blank"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "worklet-layout",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for worklet-layout to same-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-https",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe-blank"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "worklet-layout",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for worklet-layout to same-https origin and downgrade redirection from https context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/upgrade-insecure-requests/gen/iframe-blank-inherit.meta/upgrade/worklet-paint-import-data.https.html b/testing/web-platform/tests/upgrade-insecure-requests/gen/iframe-blank-inherit.meta/upgrade/worklet-paint-import-data.https.html
new file mode 100644
index 0000000000..0bfe4cbfa4
--- /dev/null
+++ b/testing/web-platform/tests/upgrade-insecure-requests/gen/iframe-blank-inherit.meta/upgrade/worklet-paint-import-data.https.html
@@ -0,0 +1,113 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec upgrade-insecure-requests/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "allowed",
+ "origin": "cross-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe-blank"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "worklet-paint-import-data",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for worklet-paint-import-data to cross-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "cross-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe-blank"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "worklet-paint-import-data",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for worklet-paint-import-data to cross-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "cross-https",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe-blank"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "worklet-paint-import-data",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for worklet-paint-import-data to cross-https origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe-blank"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "worklet-paint-import-data",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for worklet-paint-import-data to same-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe-blank"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "worklet-paint-import-data",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for worklet-paint-import-data to same-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-https",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe-blank"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "worklet-paint-import-data",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for worklet-paint-import-data to same-https origin and downgrade redirection from https context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/upgrade-insecure-requests/gen/iframe-blank-inherit.meta/upgrade/worklet-paint.https.html b/testing/web-platform/tests/upgrade-insecure-requests/gen/iframe-blank-inherit.meta/upgrade/worklet-paint.https.html
new file mode 100644
index 0000000000..887fe458cd
--- /dev/null
+++ b/testing/web-platform/tests/upgrade-insecure-requests/gen/iframe-blank-inherit.meta/upgrade/worklet-paint.https.html
@@ -0,0 +1,113 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec upgrade-insecure-requests/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "allowed",
+ "origin": "cross-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe-blank"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "worklet-paint",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for worklet-paint to cross-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "cross-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe-blank"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "worklet-paint",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for worklet-paint to cross-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "cross-https",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe-blank"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "worklet-paint",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for worklet-paint to cross-https origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe-blank"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "worklet-paint",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for worklet-paint to same-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe-blank"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "worklet-paint",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for worklet-paint to same-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-https",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe-blank"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "worklet-paint",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for worklet-paint to same-https origin and downgrade redirection from https context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/upgrade-insecure-requests/gen/iframe-blank-inherit.meta/upgrade/xhr.https.html b/testing/web-platform/tests/upgrade-insecure-requests/gen/iframe-blank-inherit.meta/upgrade/xhr.https.html
new file mode 100644
index 0000000000..de3a621364
--- /dev/null
+++ b/testing/web-platform/tests/upgrade-insecure-requests/gen/iframe-blank-inherit.meta/upgrade/xhr.https.html
@@ -0,0 +1,113 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec upgrade-insecure-requests/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "allowed",
+ "origin": "cross-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe-blank"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for xhr to cross-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "cross-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe-blank"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for xhr to cross-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "cross-https",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe-blank"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for xhr to cross-https origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe-blank"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for xhr to same-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe-blank"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for xhr to same-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-https",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "iframe-blank"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for xhr to same-https origin and downgrade redirection from https context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/upgrade-insecure-requests/gen/sharedworker-classic-data.http-rp/upgrade/fetch.https.html b/testing/web-platform/tests/upgrade-insecure-requests/gen/sharedworker-classic-data.http-rp/upgrade/fetch.https.html
new file mode 100644
index 0000000000..4184e7c158
--- /dev/null
+++ b/testing/web-platform/tests/upgrade-insecure-requests/gen/sharedworker-classic-data.http-rp/upgrade/fetch.https.html
@@ -0,0 +1,112 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec upgrade-insecure-requests/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "allowed",
+ "origin": "cross-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "sharedworker-classic-data"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for fetch to cross-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "cross-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "sharedworker-classic-data"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for fetch to cross-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "cross-https",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "sharedworker-classic-data"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for fetch to cross-https origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "sharedworker-classic-data"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for fetch to same-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "sharedworker-classic-data"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for fetch to same-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-https",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "sharedworker-classic-data"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for fetch to same-https origin and downgrade redirection from https context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/upgrade-insecure-requests/gen/sharedworker-classic-data.http-rp/upgrade/fetch.https.html.headers b/testing/web-platform/tests/upgrade-insecure-requests/gen/sharedworker-classic-data.http-rp/upgrade/fetch.https.html.headers
new file mode 100644
index 0000000000..602d9dc38d
--- /dev/null
+++ b/testing/web-platform/tests/upgrade-insecure-requests/gen/sharedworker-classic-data.http-rp/upgrade/fetch.https.html.headers
@@ -0,0 +1 @@
+Content-Security-Policy: upgrade-insecure-requests
diff --git a/testing/web-platform/tests/upgrade-insecure-requests/gen/sharedworker-classic-data.http-rp/upgrade/websocket.https.html b/testing/web-platform/tests/upgrade-insecure-requests/gen/sharedworker-classic-data.http-rp/upgrade/websocket.https.html
new file mode 100644
index 0000000000..c41e4cde41
--- /dev/null
+++ b/testing/web-platform/tests/upgrade-insecure-requests/gen/sharedworker-classic-data.http-rp/upgrade/websocket.https.html
@@ -0,0 +1,52 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec upgrade-insecure-requests/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "allowed",
+ "origin": "cross-ws-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "sharedworker-classic-data"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "websocket",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for websocket to cross-ws-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-ws-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "sharedworker-classic-data"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "websocket",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for websocket to same-ws-downgrade origin and no-redirect redirection from https context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/upgrade-insecure-requests/gen/sharedworker-classic-data.http-rp/upgrade/websocket.https.html.headers b/testing/web-platform/tests/upgrade-insecure-requests/gen/sharedworker-classic-data.http-rp/upgrade/websocket.https.html.headers
new file mode 100644
index 0000000000..602d9dc38d
--- /dev/null
+++ b/testing/web-platform/tests/upgrade-insecure-requests/gen/sharedworker-classic-data.http-rp/upgrade/websocket.https.html.headers
@@ -0,0 +1 @@
+Content-Security-Policy: upgrade-insecure-requests
diff --git a/testing/web-platform/tests/upgrade-insecure-requests/gen/sharedworker-classic-data.http-rp/upgrade/xhr.https.html b/testing/web-platform/tests/upgrade-insecure-requests/gen/sharedworker-classic-data.http-rp/upgrade/xhr.https.html
new file mode 100644
index 0000000000..62a5883cad
--- /dev/null
+++ b/testing/web-platform/tests/upgrade-insecure-requests/gen/sharedworker-classic-data.http-rp/upgrade/xhr.https.html
@@ -0,0 +1,112 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec upgrade-insecure-requests/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "allowed",
+ "origin": "cross-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "sharedworker-classic-data"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for xhr to cross-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "cross-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "sharedworker-classic-data"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for xhr to cross-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "cross-https",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "sharedworker-classic-data"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for xhr to cross-https origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "sharedworker-classic-data"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for xhr to same-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "sharedworker-classic-data"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for xhr to same-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-https",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "sharedworker-classic-data"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for xhr to same-https origin and downgrade redirection from https context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/upgrade-insecure-requests/gen/sharedworker-classic-data.http-rp/upgrade/xhr.https.html.headers b/testing/web-platform/tests/upgrade-insecure-requests/gen/sharedworker-classic-data.http-rp/upgrade/xhr.https.html.headers
new file mode 100644
index 0000000000..602d9dc38d
--- /dev/null
+++ b/testing/web-platform/tests/upgrade-insecure-requests/gen/sharedworker-classic-data.http-rp/upgrade/xhr.https.html.headers
@@ -0,0 +1 @@
+Content-Security-Policy: upgrade-insecure-requests
diff --git a/testing/web-platform/tests/upgrade-insecure-requests/gen/sharedworker-classic-data.meta/unset/fetch.https.html b/testing/web-platform/tests/upgrade-insecure-requests/gen/sharedworker-classic-data.meta/unset/fetch.https.html
new file mode 100644
index 0000000000..2a7dbda8b5
--- /dev/null
+++ b/testing/web-platform/tests/upgrade-insecure-requests/gen/sharedworker-classic-data.meta/unset/fetch.https.html
@@ -0,0 +1,112 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec upgrade-insecure-requests/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "blocked",
+ "origin": "cross-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "sharedworker-classic-data"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for fetch to cross-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "cross-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "sharedworker-classic-data"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for fetch to cross-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "cross-https",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "sharedworker-classic-data"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for fetch to cross-https origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "same-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "sharedworker-classic-data"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for fetch to same-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "same-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "sharedworker-classic-data"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for fetch to same-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "same-https",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "sharedworker-classic-data"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for fetch to same-https origin and downgrade redirection from https context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/upgrade-insecure-requests/gen/sharedworker-classic-data.meta/unset/websocket.https.html b/testing/web-platform/tests/upgrade-insecure-requests/gen/sharedworker-classic-data.meta/unset/websocket.https.html
new file mode 100644
index 0000000000..116967e020
--- /dev/null
+++ b/testing/web-platform/tests/upgrade-insecure-requests/gen/sharedworker-classic-data.meta/unset/websocket.https.html
@@ -0,0 +1,52 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec upgrade-insecure-requests/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "blocked",
+ "origin": "cross-ws-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "sharedworker-classic-data"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "websocket",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for websocket to cross-ws-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "same-ws-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "sharedworker-classic-data"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "websocket",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for websocket to same-ws-downgrade origin and no-redirect redirection from https context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/upgrade-insecure-requests/gen/sharedworker-classic-data.meta/unset/xhr.https.html b/testing/web-platform/tests/upgrade-insecure-requests/gen/sharedworker-classic-data.meta/unset/xhr.https.html
new file mode 100644
index 0000000000..fa60413af5
--- /dev/null
+++ b/testing/web-platform/tests/upgrade-insecure-requests/gen/sharedworker-classic-data.meta/unset/xhr.https.html
@@ -0,0 +1,112 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec upgrade-insecure-requests/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "blocked",
+ "origin": "cross-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "sharedworker-classic-data"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for xhr to cross-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "cross-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "sharedworker-classic-data"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for xhr to cross-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "cross-https",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "sharedworker-classic-data"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for xhr to cross-https origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "same-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "sharedworker-classic-data"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for xhr to same-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "same-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "sharedworker-classic-data"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for xhr to same-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "same-https",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "sharedworker-classic-data"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for xhr to same-https origin and downgrade redirection from https context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/upgrade-insecure-requests/gen/sharedworker-classic-data.meta/upgrade/fetch.https.html b/testing/web-platform/tests/upgrade-insecure-requests/gen/sharedworker-classic-data.meta/upgrade/fetch.https.html
new file mode 100644
index 0000000000..fb39f9bc5c
--- /dev/null
+++ b/testing/web-platform/tests/upgrade-insecure-requests/gen/sharedworker-classic-data.meta/upgrade/fetch.https.html
@@ -0,0 +1,113 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec upgrade-insecure-requests/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "allowed",
+ "origin": "cross-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "sharedworker-classic-data"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for fetch to cross-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "cross-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "sharedworker-classic-data"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for fetch to cross-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "cross-https",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "sharedworker-classic-data"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for fetch to cross-https origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "sharedworker-classic-data"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for fetch to same-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "sharedworker-classic-data"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for fetch to same-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-https",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "sharedworker-classic-data"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for fetch to same-https origin and downgrade redirection from https context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/upgrade-insecure-requests/gen/sharedworker-classic-data.meta/upgrade/websocket.https.html b/testing/web-platform/tests/upgrade-insecure-requests/gen/sharedworker-classic-data.meta/upgrade/websocket.https.html
new file mode 100644
index 0000000000..4347f01188
--- /dev/null
+++ b/testing/web-platform/tests/upgrade-insecure-requests/gen/sharedworker-classic-data.meta/upgrade/websocket.https.html
@@ -0,0 +1,53 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec upgrade-insecure-requests/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "allowed",
+ "origin": "cross-ws-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "sharedworker-classic-data"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "websocket",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for websocket to cross-ws-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-ws-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "sharedworker-classic-data"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "websocket",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for websocket to same-ws-downgrade origin and no-redirect redirection from https context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/upgrade-insecure-requests/gen/sharedworker-classic-data.meta/upgrade/xhr.https.html b/testing/web-platform/tests/upgrade-insecure-requests/gen/sharedworker-classic-data.meta/upgrade/xhr.https.html
new file mode 100644
index 0000000000..d5f9b891b5
--- /dev/null
+++ b/testing/web-platform/tests/upgrade-insecure-requests/gen/sharedworker-classic-data.meta/upgrade/xhr.https.html
@@ -0,0 +1,113 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec upgrade-insecure-requests/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "allowed",
+ "origin": "cross-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "sharedworker-classic-data"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for xhr to cross-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "cross-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "sharedworker-classic-data"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for xhr to cross-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "cross-https",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "sharedworker-classic-data"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for xhr to cross-https origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "sharedworker-classic-data"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for xhr to same-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "sharedworker-classic-data"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for xhr to same-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-https",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "sharedworker-classic-data"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for xhr to same-https origin and downgrade redirection from https context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/upgrade-insecure-requests/gen/sharedworker-classic.http-rp/upgrade/fetch.https.html b/testing/web-platform/tests/upgrade-insecure-requests/gen/sharedworker-classic.http-rp/upgrade/fetch.https.html
new file mode 100644
index 0000000000..1d8b60fea6
--- /dev/null
+++ b/testing/web-platform/tests/upgrade-insecure-requests/gen/sharedworker-classic.http-rp/upgrade/fetch.https.html
@@ -0,0 +1,148 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec upgrade-insecure-requests/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "allowed",
+ "origin": "cross-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "upgradeInsecureRequests",
+ "value": "upgrade"
+ }
+ ],
+ "sourceContextType": "sharedworker-classic"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for fetch to cross-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "cross-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "upgradeInsecureRequests",
+ "value": "upgrade"
+ }
+ ],
+ "sourceContextType": "sharedworker-classic"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for fetch to cross-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "cross-https",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "upgradeInsecureRequests",
+ "value": "upgrade"
+ }
+ ],
+ "sourceContextType": "sharedworker-classic"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for fetch to cross-https origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "upgradeInsecureRequests",
+ "value": "upgrade"
+ }
+ ],
+ "sourceContextType": "sharedworker-classic"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for fetch to same-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "upgradeInsecureRequests",
+ "value": "upgrade"
+ }
+ ],
+ "sourceContextType": "sharedworker-classic"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for fetch to same-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-https",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "upgradeInsecureRequests",
+ "value": "upgrade"
+ }
+ ],
+ "sourceContextType": "sharedworker-classic"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for fetch to same-https origin and downgrade redirection from https context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/upgrade-insecure-requests/gen/sharedworker-classic.http-rp/upgrade/websocket.https.html b/testing/web-platform/tests/upgrade-insecure-requests/gen/sharedworker-classic.http-rp/upgrade/websocket.https.html
new file mode 100644
index 0000000000..bb031af962
--- /dev/null
+++ b/testing/web-platform/tests/upgrade-insecure-requests/gen/sharedworker-classic.http-rp/upgrade/websocket.https.html
@@ -0,0 +1,64 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec upgrade-insecure-requests/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "allowed",
+ "origin": "cross-ws-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "upgradeInsecureRequests",
+ "value": "upgrade"
+ }
+ ],
+ "sourceContextType": "sharedworker-classic"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "websocket",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for websocket to cross-ws-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-ws-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "upgradeInsecureRequests",
+ "value": "upgrade"
+ }
+ ],
+ "sourceContextType": "sharedworker-classic"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "websocket",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for websocket to same-ws-downgrade origin and no-redirect redirection from https context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/upgrade-insecure-requests/gen/sharedworker-classic.http-rp/upgrade/xhr.https.html b/testing/web-platform/tests/upgrade-insecure-requests/gen/sharedworker-classic.http-rp/upgrade/xhr.https.html
new file mode 100644
index 0000000000..00c297642f
--- /dev/null
+++ b/testing/web-platform/tests/upgrade-insecure-requests/gen/sharedworker-classic.http-rp/upgrade/xhr.https.html
@@ -0,0 +1,148 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec upgrade-insecure-requests/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "allowed",
+ "origin": "cross-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "upgradeInsecureRequests",
+ "value": "upgrade"
+ }
+ ],
+ "sourceContextType": "sharedworker-classic"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for xhr to cross-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "cross-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "upgradeInsecureRequests",
+ "value": "upgrade"
+ }
+ ],
+ "sourceContextType": "sharedworker-classic"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for xhr to cross-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "cross-https",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "upgradeInsecureRequests",
+ "value": "upgrade"
+ }
+ ],
+ "sourceContextType": "sharedworker-classic"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for xhr to cross-https origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "upgradeInsecureRequests",
+ "value": "upgrade"
+ }
+ ],
+ "sourceContextType": "sharedworker-classic"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for xhr to same-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "upgradeInsecureRequests",
+ "value": "upgrade"
+ }
+ ],
+ "sourceContextType": "sharedworker-classic"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for xhr to same-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-https",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "upgradeInsecureRequests",
+ "value": "upgrade"
+ }
+ ],
+ "sourceContextType": "sharedworker-classic"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for xhr to same-https origin and downgrade redirection from https context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/upgrade-insecure-requests/gen/sharedworker-module-data.http-rp/upgrade/fetch.https.html b/testing/web-platform/tests/upgrade-insecure-requests/gen/sharedworker-module-data.http-rp/upgrade/fetch.https.html
new file mode 100644
index 0000000000..a69ca6ebb1
--- /dev/null
+++ b/testing/web-platform/tests/upgrade-insecure-requests/gen/sharedworker-module-data.http-rp/upgrade/fetch.https.html
@@ -0,0 +1,112 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec upgrade-insecure-requests/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "allowed",
+ "origin": "cross-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "sharedworker-module-data"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for fetch to cross-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "cross-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "sharedworker-module-data"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for fetch to cross-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "cross-https",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "sharedworker-module-data"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for fetch to cross-https origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "sharedworker-module-data"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for fetch to same-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "sharedworker-module-data"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for fetch to same-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-https",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "sharedworker-module-data"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for fetch to same-https origin and downgrade redirection from https context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/upgrade-insecure-requests/gen/sharedworker-module-data.http-rp/upgrade/fetch.https.html.headers b/testing/web-platform/tests/upgrade-insecure-requests/gen/sharedworker-module-data.http-rp/upgrade/fetch.https.html.headers
new file mode 100644
index 0000000000..602d9dc38d
--- /dev/null
+++ b/testing/web-platform/tests/upgrade-insecure-requests/gen/sharedworker-module-data.http-rp/upgrade/fetch.https.html.headers
@@ -0,0 +1 @@
+Content-Security-Policy: upgrade-insecure-requests
diff --git a/testing/web-platform/tests/upgrade-insecure-requests/gen/sharedworker-module-data.http-rp/upgrade/websocket.https.html b/testing/web-platform/tests/upgrade-insecure-requests/gen/sharedworker-module-data.http-rp/upgrade/websocket.https.html
new file mode 100644
index 0000000000..df2014e449
--- /dev/null
+++ b/testing/web-platform/tests/upgrade-insecure-requests/gen/sharedworker-module-data.http-rp/upgrade/websocket.https.html
@@ -0,0 +1,52 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec upgrade-insecure-requests/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "allowed",
+ "origin": "cross-ws-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "sharedworker-module-data"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "websocket",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for websocket to cross-ws-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-ws-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "sharedworker-module-data"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "websocket",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for websocket to same-ws-downgrade origin and no-redirect redirection from https context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/upgrade-insecure-requests/gen/sharedworker-module-data.http-rp/upgrade/websocket.https.html.headers b/testing/web-platform/tests/upgrade-insecure-requests/gen/sharedworker-module-data.http-rp/upgrade/websocket.https.html.headers
new file mode 100644
index 0000000000..602d9dc38d
--- /dev/null
+++ b/testing/web-platform/tests/upgrade-insecure-requests/gen/sharedworker-module-data.http-rp/upgrade/websocket.https.html.headers
@@ -0,0 +1 @@
+Content-Security-Policy: upgrade-insecure-requests
diff --git a/testing/web-platform/tests/upgrade-insecure-requests/gen/sharedworker-module-data.http-rp/upgrade/xhr.https.html b/testing/web-platform/tests/upgrade-insecure-requests/gen/sharedworker-module-data.http-rp/upgrade/xhr.https.html
new file mode 100644
index 0000000000..8790654a03
--- /dev/null
+++ b/testing/web-platform/tests/upgrade-insecure-requests/gen/sharedworker-module-data.http-rp/upgrade/xhr.https.html
@@ -0,0 +1,112 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec upgrade-insecure-requests/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "allowed",
+ "origin": "cross-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "sharedworker-module-data"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for xhr to cross-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "cross-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "sharedworker-module-data"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for xhr to cross-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "cross-https",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "sharedworker-module-data"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for xhr to cross-https origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "sharedworker-module-data"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for xhr to same-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "sharedworker-module-data"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for xhr to same-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-https",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "sharedworker-module-data"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for xhr to same-https origin and downgrade redirection from https context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/upgrade-insecure-requests/gen/sharedworker-module-data.http-rp/upgrade/xhr.https.html.headers b/testing/web-platform/tests/upgrade-insecure-requests/gen/sharedworker-module-data.http-rp/upgrade/xhr.https.html.headers
new file mode 100644
index 0000000000..602d9dc38d
--- /dev/null
+++ b/testing/web-platform/tests/upgrade-insecure-requests/gen/sharedworker-module-data.http-rp/upgrade/xhr.https.html.headers
@@ -0,0 +1 @@
+Content-Security-Policy: upgrade-insecure-requests
diff --git a/testing/web-platform/tests/upgrade-insecure-requests/gen/sharedworker-module-data.meta/unset/fetch.https.html b/testing/web-platform/tests/upgrade-insecure-requests/gen/sharedworker-module-data.meta/unset/fetch.https.html
new file mode 100644
index 0000000000..9f8b280cf4
--- /dev/null
+++ b/testing/web-platform/tests/upgrade-insecure-requests/gen/sharedworker-module-data.meta/unset/fetch.https.html
@@ -0,0 +1,112 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec upgrade-insecure-requests/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "blocked",
+ "origin": "cross-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "sharedworker-module-data"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for fetch to cross-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "cross-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "sharedworker-module-data"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for fetch to cross-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "cross-https",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "sharedworker-module-data"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for fetch to cross-https origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "same-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "sharedworker-module-data"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for fetch to same-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "same-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "sharedworker-module-data"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for fetch to same-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "same-https",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "sharedworker-module-data"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for fetch to same-https origin and downgrade redirection from https context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/upgrade-insecure-requests/gen/sharedworker-module-data.meta/unset/websocket.https.html b/testing/web-platform/tests/upgrade-insecure-requests/gen/sharedworker-module-data.meta/unset/websocket.https.html
new file mode 100644
index 0000000000..9861314634
--- /dev/null
+++ b/testing/web-platform/tests/upgrade-insecure-requests/gen/sharedworker-module-data.meta/unset/websocket.https.html
@@ -0,0 +1,52 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec upgrade-insecure-requests/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "blocked",
+ "origin": "cross-ws-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "sharedworker-module-data"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "websocket",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for websocket to cross-ws-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "same-ws-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "sharedworker-module-data"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "websocket",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for websocket to same-ws-downgrade origin and no-redirect redirection from https context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/upgrade-insecure-requests/gen/sharedworker-module-data.meta/unset/xhr.https.html b/testing/web-platform/tests/upgrade-insecure-requests/gen/sharedworker-module-data.meta/unset/xhr.https.html
new file mode 100644
index 0000000000..d71d1f76ed
--- /dev/null
+++ b/testing/web-platform/tests/upgrade-insecure-requests/gen/sharedworker-module-data.meta/unset/xhr.https.html
@@ -0,0 +1,112 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec upgrade-insecure-requests/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "blocked",
+ "origin": "cross-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "sharedworker-module-data"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for xhr to cross-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "cross-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "sharedworker-module-data"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for xhr to cross-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "cross-https",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "sharedworker-module-data"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for xhr to cross-https origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "same-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "sharedworker-module-data"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for xhr to same-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "same-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "sharedworker-module-data"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for xhr to same-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "same-https",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "sharedworker-module-data"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for xhr to same-https origin and downgrade redirection from https context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/upgrade-insecure-requests/gen/sharedworker-module-data.meta/upgrade/fetch.https.html b/testing/web-platform/tests/upgrade-insecure-requests/gen/sharedworker-module-data.meta/upgrade/fetch.https.html
new file mode 100644
index 0000000000..63cca40cd2
--- /dev/null
+++ b/testing/web-platform/tests/upgrade-insecure-requests/gen/sharedworker-module-data.meta/upgrade/fetch.https.html
@@ -0,0 +1,113 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec upgrade-insecure-requests/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "allowed",
+ "origin": "cross-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "sharedworker-module-data"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for fetch to cross-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "cross-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "sharedworker-module-data"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for fetch to cross-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "cross-https",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "sharedworker-module-data"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for fetch to cross-https origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "sharedworker-module-data"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for fetch to same-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "sharedworker-module-data"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for fetch to same-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-https",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "sharedworker-module-data"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for fetch to same-https origin and downgrade redirection from https context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/upgrade-insecure-requests/gen/sharedworker-module-data.meta/upgrade/websocket.https.html b/testing/web-platform/tests/upgrade-insecure-requests/gen/sharedworker-module-data.meta/upgrade/websocket.https.html
new file mode 100644
index 0000000000..36bac646a0
--- /dev/null
+++ b/testing/web-platform/tests/upgrade-insecure-requests/gen/sharedworker-module-data.meta/upgrade/websocket.https.html
@@ -0,0 +1,53 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec upgrade-insecure-requests/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "allowed",
+ "origin": "cross-ws-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "sharedworker-module-data"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "websocket",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for websocket to cross-ws-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-ws-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "sharedworker-module-data"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "websocket",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for websocket to same-ws-downgrade origin and no-redirect redirection from https context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/upgrade-insecure-requests/gen/sharedworker-module-data.meta/upgrade/xhr.https.html b/testing/web-platform/tests/upgrade-insecure-requests/gen/sharedworker-module-data.meta/upgrade/xhr.https.html
new file mode 100644
index 0000000000..279e92e9f1
--- /dev/null
+++ b/testing/web-platform/tests/upgrade-insecure-requests/gen/sharedworker-module-data.meta/upgrade/xhr.https.html
@@ -0,0 +1,113 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec upgrade-insecure-requests/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "allowed",
+ "origin": "cross-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "sharedworker-module-data"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for xhr to cross-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "cross-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "sharedworker-module-data"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for xhr to cross-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "cross-https",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "sharedworker-module-data"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for xhr to cross-https origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "sharedworker-module-data"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for xhr to same-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "sharedworker-module-data"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for xhr to same-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-https",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "sharedworker-module-data"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for xhr to same-https origin and downgrade redirection from https context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/upgrade-insecure-requests/gen/sharedworker-module.http-rp/upgrade/fetch.https.html b/testing/web-platform/tests/upgrade-insecure-requests/gen/sharedworker-module.http-rp/upgrade/fetch.https.html
new file mode 100644
index 0000000000..593c92fa50
--- /dev/null
+++ b/testing/web-platform/tests/upgrade-insecure-requests/gen/sharedworker-module.http-rp/upgrade/fetch.https.html
@@ -0,0 +1,148 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec upgrade-insecure-requests/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "allowed",
+ "origin": "cross-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "upgradeInsecureRequests",
+ "value": "upgrade"
+ }
+ ],
+ "sourceContextType": "sharedworker-module"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for fetch to cross-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "cross-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "upgradeInsecureRequests",
+ "value": "upgrade"
+ }
+ ],
+ "sourceContextType": "sharedworker-module"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for fetch to cross-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "cross-https",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "upgradeInsecureRequests",
+ "value": "upgrade"
+ }
+ ],
+ "sourceContextType": "sharedworker-module"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for fetch to cross-https origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "upgradeInsecureRequests",
+ "value": "upgrade"
+ }
+ ],
+ "sourceContextType": "sharedworker-module"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for fetch to same-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "upgradeInsecureRequests",
+ "value": "upgrade"
+ }
+ ],
+ "sourceContextType": "sharedworker-module"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for fetch to same-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-https",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "upgradeInsecureRequests",
+ "value": "upgrade"
+ }
+ ],
+ "sourceContextType": "sharedworker-module"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for fetch to same-https origin and downgrade redirection from https context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/upgrade-insecure-requests/gen/sharedworker-module.http-rp/upgrade/websocket.https.html b/testing/web-platform/tests/upgrade-insecure-requests/gen/sharedworker-module.http-rp/upgrade/websocket.https.html
new file mode 100644
index 0000000000..6be3b239aa
--- /dev/null
+++ b/testing/web-platform/tests/upgrade-insecure-requests/gen/sharedworker-module.http-rp/upgrade/websocket.https.html
@@ -0,0 +1,64 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec upgrade-insecure-requests/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "allowed",
+ "origin": "cross-ws-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "upgradeInsecureRequests",
+ "value": "upgrade"
+ }
+ ],
+ "sourceContextType": "sharedworker-module"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "websocket",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for websocket to cross-ws-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-ws-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "upgradeInsecureRequests",
+ "value": "upgrade"
+ }
+ ],
+ "sourceContextType": "sharedworker-module"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "websocket",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for websocket to same-ws-downgrade origin and no-redirect redirection from https context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/upgrade-insecure-requests/gen/sharedworker-module.http-rp/upgrade/xhr.https.html b/testing/web-platform/tests/upgrade-insecure-requests/gen/sharedworker-module.http-rp/upgrade/xhr.https.html
new file mode 100644
index 0000000000..d307b33c49
--- /dev/null
+++ b/testing/web-platform/tests/upgrade-insecure-requests/gen/sharedworker-module.http-rp/upgrade/xhr.https.html
@@ -0,0 +1,148 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec upgrade-insecure-requests/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "allowed",
+ "origin": "cross-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "upgradeInsecureRequests",
+ "value": "upgrade"
+ }
+ ],
+ "sourceContextType": "sharedworker-module"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for xhr to cross-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "cross-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "upgradeInsecureRequests",
+ "value": "upgrade"
+ }
+ ],
+ "sourceContextType": "sharedworker-module"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for xhr to cross-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "cross-https",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "upgradeInsecureRequests",
+ "value": "upgrade"
+ }
+ ],
+ "sourceContextType": "sharedworker-module"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for xhr to cross-https origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "upgradeInsecureRequests",
+ "value": "upgrade"
+ }
+ ],
+ "sourceContextType": "sharedworker-module"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for xhr to same-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "upgradeInsecureRequests",
+ "value": "upgrade"
+ }
+ ],
+ "sourceContextType": "sharedworker-module"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for xhr to same-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-https",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "upgradeInsecureRequests",
+ "value": "upgrade"
+ }
+ ],
+ "sourceContextType": "sharedworker-module"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for xhr to same-https origin and downgrade redirection from https context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/upgrade-insecure-requests/gen/srcdoc-inherit.meta/unset/fetch.https.html b/testing/web-platform/tests/upgrade-insecure-requests/gen/srcdoc-inherit.meta/unset/fetch.https.html
new file mode 100644
index 0000000000..f8585f64d3
--- /dev/null
+++ b/testing/web-platform/tests/upgrade-insecure-requests/gen/srcdoc-inherit.meta/unset/fetch.https.html
@@ -0,0 +1,112 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec upgrade-insecure-requests/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "blocked",
+ "origin": "cross-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "srcdoc"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for fetch to cross-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "cross-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "srcdoc"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for fetch to cross-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "cross-https",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "srcdoc"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for fetch to cross-https origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "same-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "srcdoc"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for fetch to same-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "same-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "srcdoc"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for fetch to same-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "same-https",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "srcdoc"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for fetch to same-https origin and downgrade redirection from https context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/upgrade-insecure-requests/gen/srcdoc-inherit.meta/unset/iframe-tag.https.html b/testing/web-platform/tests/upgrade-insecure-requests/gen/srcdoc-inherit.meta/unset/iframe-tag.https.html
new file mode 100644
index 0000000000..8b63807eaa
--- /dev/null
+++ b/testing/web-platform/tests/upgrade-insecure-requests/gen/srcdoc-inherit.meta/unset/iframe-tag.https.html
@@ -0,0 +1,112 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec upgrade-insecure-requests/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "blocked",
+ "origin": "cross-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "srcdoc"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for iframe-tag to cross-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "cross-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "srcdoc"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for iframe-tag to cross-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "cross-https",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "srcdoc"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for iframe-tag to cross-https origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "same-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "srcdoc"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for iframe-tag to same-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "same-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "srcdoc"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for iframe-tag to same-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "same-https",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "srcdoc"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for iframe-tag to same-https origin and downgrade redirection from https context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/upgrade-insecure-requests/gen/srcdoc-inherit.meta/unset/img-tag.https.html b/testing/web-platform/tests/upgrade-insecure-requests/gen/srcdoc-inherit.meta/unset/img-tag.https.html
new file mode 100644
index 0000000000..e7eb4050e2
--- /dev/null
+++ b/testing/web-platform/tests/upgrade-insecure-requests/gen/srcdoc-inherit.meta/unset/img-tag.https.html
@@ -0,0 +1,112 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec upgrade-insecure-requests/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "blocked",
+ "origin": "cross-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "srcdoc"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for img-tag to cross-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "cross-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "srcdoc"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for img-tag to cross-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "cross-https",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "srcdoc"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for img-tag to cross-https origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "same-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "srcdoc"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for img-tag to same-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "same-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "srcdoc"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for img-tag to same-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "same-https",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "srcdoc"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for img-tag to same-https origin and downgrade redirection from https context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/upgrade-insecure-requests/gen/srcdoc-inherit.meta/unset/sharedworker-classic.https.html b/testing/web-platform/tests/upgrade-insecure-requests/gen/srcdoc-inherit.meta/unset/sharedworker-classic.https.html
new file mode 100644
index 0000000000..89db3b1be9
--- /dev/null
+++ b/testing/web-platform/tests/upgrade-insecure-requests/gen/srcdoc-inherit.meta/unset/sharedworker-classic.https.html
@@ -0,0 +1,67 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec upgrade-insecure-requests/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "blocked",
+ "origin": "same-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "srcdoc"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "sharedworker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for sharedworker-classic to same-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "same-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "srcdoc"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "sharedworker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for sharedworker-classic to same-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "same-https",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "srcdoc"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "sharedworker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for sharedworker-classic to same-https origin and downgrade redirection from https context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/upgrade-insecure-requests/gen/srcdoc-inherit.meta/unset/sharedworker-import-data.https.html b/testing/web-platform/tests/upgrade-insecure-requests/gen/srcdoc-inherit.meta/unset/sharedworker-import-data.https.html
new file mode 100644
index 0000000000..6e61de3bc4
--- /dev/null
+++ b/testing/web-platform/tests/upgrade-insecure-requests/gen/srcdoc-inherit.meta/unset/sharedworker-import-data.https.html
@@ -0,0 +1,112 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec upgrade-insecure-requests/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "blocked",
+ "origin": "cross-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "srcdoc"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "sharedworker-import-data",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for sharedworker-import-data to cross-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "cross-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "srcdoc"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "sharedworker-import-data",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for sharedworker-import-data to cross-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "cross-https",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "srcdoc"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "sharedworker-import-data",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for sharedworker-import-data to cross-https origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "same-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "srcdoc"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "sharedworker-import-data",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for sharedworker-import-data to same-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "same-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "srcdoc"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "sharedworker-import-data",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for sharedworker-import-data to same-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "same-https",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "srcdoc"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "sharedworker-import-data",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for sharedworker-import-data to same-https origin and downgrade redirection from https context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/upgrade-insecure-requests/gen/srcdoc-inherit.meta/unset/sharedworker-import.https.html b/testing/web-platform/tests/upgrade-insecure-requests/gen/srcdoc-inherit.meta/unset/sharedworker-import.https.html
new file mode 100644
index 0000000000..754365142a
--- /dev/null
+++ b/testing/web-platform/tests/upgrade-insecure-requests/gen/srcdoc-inherit.meta/unset/sharedworker-import.https.html
@@ -0,0 +1,112 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec upgrade-insecure-requests/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "blocked",
+ "origin": "cross-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "srcdoc"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "sharedworker-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for sharedworker-import to cross-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "cross-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "srcdoc"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "sharedworker-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for sharedworker-import to cross-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "cross-https",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "srcdoc"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "sharedworker-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for sharedworker-import to cross-https origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "same-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "srcdoc"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "sharedworker-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for sharedworker-import to same-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "same-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "srcdoc"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "sharedworker-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for sharedworker-import to same-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "same-https",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "srcdoc"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "sharedworker-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for sharedworker-import to same-https origin and downgrade redirection from https context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/upgrade-insecure-requests/gen/srcdoc-inherit.meta/unset/sharedworker-module.https.html b/testing/web-platform/tests/upgrade-insecure-requests/gen/srcdoc-inherit.meta/unset/sharedworker-module.https.html
new file mode 100644
index 0000000000..e9031bccb9
--- /dev/null
+++ b/testing/web-platform/tests/upgrade-insecure-requests/gen/srcdoc-inherit.meta/unset/sharedworker-module.https.html
@@ -0,0 +1,67 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec upgrade-insecure-requests/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "blocked",
+ "origin": "same-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "srcdoc"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "sharedworker-module",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for sharedworker-module to same-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "same-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "srcdoc"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "sharedworker-module",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for sharedworker-module to same-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "same-https",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "srcdoc"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "sharedworker-module",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for sharedworker-module to same-https origin and downgrade redirection from https context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/upgrade-insecure-requests/gen/srcdoc-inherit.meta/unset/websocket.https.html b/testing/web-platform/tests/upgrade-insecure-requests/gen/srcdoc-inherit.meta/unset/websocket.https.html
new file mode 100644
index 0000000000..dfc63fe9b0
--- /dev/null
+++ b/testing/web-platform/tests/upgrade-insecure-requests/gen/srcdoc-inherit.meta/unset/websocket.https.html
@@ -0,0 +1,52 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec upgrade-insecure-requests/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "blocked",
+ "origin": "cross-ws-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "srcdoc"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "websocket",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for websocket to cross-ws-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "same-ws-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "srcdoc"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "websocket",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for websocket to same-ws-downgrade origin and no-redirect redirection from https context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/upgrade-insecure-requests/gen/srcdoc-inherit.meta/unset/worker-classic.https.html b/testing/web-platform/tests/upgrade-insecure-requests/gen/srcdoc-inherit.meta/unset/worker-classic.https.html
new file mode 100644
index 0000000000..819ef182e9
--- /dev/null
+++ b/testing/web-platform/tests/upgrade-insecure-requests/gen/srcdoc-inherit.meta/unset/worker-classic.https.html
@@ -0,0 +1,67 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec upgrade-insecure-requests/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "blocked",
+ "origin": "same-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "srcdoc"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "worker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for worker-classic to same-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "same-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "srcdoc"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "worker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for worker-classic to same-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "same-https",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "srcdoc"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "worker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for worker-classic to same-https origin and downgrade redirection from https context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/upgrade-insecure-requests/gen/srcdoc-inherit.meta/unset/worker-import-data.https.html b/testing/web-platform/tests/upgrade-insecure-requests/gen/srcdoc-inherit.meta/unset/worker-import-data.https.html
new file mode 100644
index 0000000000..c060b0196d
--- /dev/null
+++ b/testing/web-platform/tests/upgrade-insecure-requests/gen/srcdoc-inherit.meta/unset/worker-import-data.https.html
@@ -0,0 +1,112 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec upgrade-insecure-requests/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "blocked",
+ "origin": "cross-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "srcdoc"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "worker-import-data",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for worker-import-data to cross-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "cross-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "srcdoc"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "worker-import-data",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for worker-import-data to cross-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "cross-https",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "srcdoc"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "worker-import-data",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for worker-import-data to cross-https origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "same-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "srcdoc"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "worker-import-data",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for worker-import-data to same-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "same-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "srcdoc"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "worker-import-data",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for worker-import-data to same-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "same-https",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "srcdoc"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "worker-import-data",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for worker-import-data to same-https origin and downgrade redirection from https context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/upgrade-insecure-requests/gen/srcdoc-inherit.meta/unset/worker-import.https.html b/testing/web-platform/tests/upgrade-insecure-requests/gen/srcdoc-inherit.meta/unset/worker-import.https.html
new file mode 100644
index 0000000000..8472deaee0
--- /dev/null
+++ b/testing/web-platform/tests/upgrade-insecure-requests/gen/srcdoc-inherit.meta/unset/worker-import.https.html
@@ -0,0 +1,112 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec upgrade-insecure-requests/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "blocked",
+ "origin": "cross-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "srcdoc"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "worker-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for worker-import to cross-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "cross-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "srcdoc"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "worker-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for worker-import to cross-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "cross-https",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "srcdoc"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "worker-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for worker-import to cross-https origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "same-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "srcdoc"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "worker-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for worker-import to same-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "same-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "srcdoc"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "worker-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for worker-import to same-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "same-https",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "srcdoc"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "worker-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for worker-import to same-https origin and downgrade redirection from https context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/upgrade-insecure-requests/gen/srcdoc-inherit.meta/unset/worker-module.https.html b/testing/web-platform/tests/upgrade-insecure-requests/gen/srcdoc-inherit.meta/unset/worker-module.https.html
new file mode 100644
index 0000000000..0282683b9d
--- /dev/null
+++ b/testing/web-platform/tests/upgrade-insecure-requests/gen/srcdoc-inherit.meta/unset/worker-module.https.html
@@ -0,0 +1,67 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec upgrade-insecure-requests/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "blocked",
+ "origin": "same-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "srcdoc"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "worker-module",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for worker-module to same-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "same-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "srcdoc"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "worker-module",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for worker-module to same-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "same-https",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "srcdoc"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "worker-module",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for worker-module to same-https origin and downgrade redirection from https context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/upgrade-insecure-requests/gen/srcdoc-inherit.meta/unset/worklet-animation-import-data.https.html b/testing/web-platform/tests/upgrade-insecure-requests/gen/srcdoc-inherit.meta/unset/worklet-animation-import-data.https.html
new file mode 100644
index 0000000000..0692fb893c
--- /dev/null
+++ b/testing/web-platform/tests/upgrade-insecure-requests/gen/srcdoc-inherit.meta/unset/worklet-animation-import-data.https.html
@@ -0,0 +1,112 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec upgrade-insecure-requests/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "blocked",
+ "origin": "cross-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "srcdoc"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "worklet-animation-import-data",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for worklet-animation-import-data to cross-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "cross-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "srcdoc"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "worklet-animation-import-data",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for worklet-animation-import-data to cross-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "cross-https",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "srcdoc"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "worklet-animation-import-data",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for worklet-animation-import-data to cross-https origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "same-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "srcdoc"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "worklet-animation-import-data",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for worklet-animation-import-data to same-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "same-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "srcdoc"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "worklet-animation-import-data",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for worklet-animation-import-data to same-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "same-https",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "srcdoc"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "worklet-animation-import-data",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for worklet-animation-import-data to same-https origin and downgrade redirection from https context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/upgrade-insecure-requests/gen/srcdoc-inherit.meta/unset/worklet-animation.https.html b/testing/web-platform/tests/upgrade-insecure-requests/gen/srcdoc-inherit.meta/unset/worklet-animation.https.html
new file mode 100644
index 0000000000..7ec880806d
--- /dev/null
+++ b/testing/web-platform/tests/upgrade-insecure-requests/gen/srcdoc-inherit.meta/unset/worklet-animation.https.html
@@ -0,0 +1,112 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec upgrade-insecure-requests/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "blocked",
+ "origin": "cross-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "srcdoc"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "worklet-animation",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for worklet-animation to cross-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "cross-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "srcdoc"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "worklet-animation",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for worklet-animation to cross-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "cross-https",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "srcdoc"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "worklet-animation",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for worklet-animation to cross-https origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "same-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "srcdoc"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "worklet-animation",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for worklet-animation to same-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "same-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "srcdoc"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "worklet-animation",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for worklet-animation to same-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "same-https",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "srcdoc"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "worklet-animation",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for worklet-animation to same-https origin and downgrade redirection from https context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/upgrade-insecure-requests/gen/srcdoc-inherit.meta/unset/worklet-audio-import-data.https.html b/testing/web-platform/tests/upgrade-insecure-requests/gen/srcdoc-inherit.meta/unset/worklet-audio-import-data.https.html
new file mode 100644
index 0000000000..40160b4fef
--- /dev/null
+++ b/testing/web-platform/tests/upgrade-insecure-requests/gen/srcdoc-inherit.meta/unset/worklet-audio-import-data.https.html
@@ -0,0 +1,112 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec upgrade-insecure-requests/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "blocked",
+ "origin": "cross-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "srcdoc"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "worklet-audio-import-data",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for worklet-audio-import-data to cross-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "cross-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "srcdoc"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "worklet-audio-import-data",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for worklet-audio-import-data to cross-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "cross-https",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "srcdoc"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "worklet-audio-import-data",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for worklet-audio-import-data to cross-https origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "same-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "srcdoc"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "worklet-audio-import-data",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for worklet-audio-import-data to same-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "same-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "srcdoc"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "worklet-audio-import-data",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for worklet-audio-import-data to same-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "same-https",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "srcdoc"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "worklet-audio-import-data",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for worklet-audio-import-data to same-https origin and downgrade redirection from https context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/upgrade-insecure-requests/gen/srcdoc-inherit.meta/unset/worklet-audio.https.html b/testing/web-platform/tests/upgrade-insecure-requests/gen/srcdoc-inherit.meta/unset/worklet-audio.https.html
new file mode 100644
index 0000000000..8dbc7012ed
--- /dev/null
+++ b/testing/web-platform/tests/upgrade-insecure-requests/gen/srcdoc-inherit.meta/unset/worklet-audio.https.html
@@ -0,0 +1,112 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec upgrade-insecure-requests/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "blocked",
+ "origin": "cross-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "srcdoc"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "worklet-audio",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for worklet-audio to cross-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "cross-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "srcdoc"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "worklet-audio",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for worklet-audio to cross-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "cross-https",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "srcdoc"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "worklet-audio",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for worklet-audio to cross-https origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "same-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "srcdoc"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "worklet-audio",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for worklet-audio to same-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "same-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "srcdoc"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "worklet-audio",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for worklet-audio to same-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "same-https",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "srcdoc"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "worklet-audio",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for worklet-audio to same-https origin and downgrade redirection from https context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/upgrade-insecure-requests/gen/srcdoc-inherit.meta/unset/worklet-layout-import-data.https.html b/testing/web-platform/tests/upgrade-insecure-requests/gen/srcdoc-inherit.meta/unset/worklet-layout-import-data.https.html
new file mode 100644
index 0000000000..c2808ac643
--- /dev/null
+++ b/testing/web-platform/tests/upgrade-insecure-requests/gen/srcdoc-inherit.meta/unset/worklet-layout-import-data.https.html
@@ -0,0 +1,112 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec upgrade-insecure-requests/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "blocked",
+ "origin": "cross-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "srcdoc"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "worklet-layout-import-data",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for worklet-layout-import-data to cross-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "cross-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "srcdoc"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "worklet-layout-import-data",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for worklet-layout-import-data to cross-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "cross-https",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "srcdoc"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "worklet-layout-import-data",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for worklet-layout-import-data to cross-https origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "same-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "srcdoc"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "worklet-layout-import-data",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for worklet-layout-import-data to same-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "same-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "srcdoc"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "worklet-layout-import-data",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for worklet-layout-import-data to same-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "same-https",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "srcdoc"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "worklet-layout-import-data",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for worklet-layout-import-data to same-https origin and downgrade redirection from https context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/upgrade-insecure-requests/gen/srcdoc-inherit.meta/unset/worklet-layout.https.html b/testing/web-platform/tests/upgrade-insecure-requests/gen/srcdoc-inherit.meta/unset/worklet-layout.https.html
new file mode 100644
index 0000000000..cc19e2775c
--- /dev/null
+++ b/testing/web-platform/tests/upgrade-insecure-requests/gen/srcdoc-inherit.meta/unset/worklet-layout.https.html
@@ -0,0 +1,112 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec upgrade-insecure-requests/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "blocked",
+ "origin": "cross-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "srcdoc"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "worklet-layout",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for worklet-layout to cross-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "cross-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "srcdoc"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "worklet-layout",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for worklet-layout to cross-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "cross-https",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "srcdoc"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "worklet-layout",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for worklet-layout to cross-https origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "same-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "srcdoc"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "worklet-layout",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for worklet-layout to same-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "same-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "srcdoc"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "worklet-layout",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for worklet-layout to same-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "same-https",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "srcdoc"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "worklet-layout",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for worklet-layout to same-https origin and downgrade redirection from https context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/upgrade-insecure-requests/gen/srcdoc-inherit.meta/unset/worklet-paint-import-data.https.html b/testing/web-platform/tests/upgrade-insecure-requests/gen/srcdoc-inherit.meta/unset/worklet-paint-import-data.https.html
new file mode 100644
index 0000000000..3ba203f3f9
--- /dev/null
+++ b/testing/web-platform/tests/upgrade-insecure-requests/gen/srcdoc-inherit.meta/unset/worklet-paint-import-data.https.html
@@ -0,0 +1,112 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec upgrade-insecure-requests/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "blocked",
+ "origin": "cross-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "srcdoc"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "worklet-paint-import-data",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for worklet-paint-import-data to cross-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "cross-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "srcdoc"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "worklet-paint-import-data",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for worklet-paint-import-data to cross-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "cross-https",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "srcdoc"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "worklet-paint-import-data",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for worklet-paint-import-data to cross-https origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "same-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "srcdoc"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "worklet-paint-import-data",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for worklet-paint-import-data to same-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "same-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "srcdoc"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "worklet-paint-import-data",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for worklet-paint-import-data to same-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "same-https",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "srcdoc"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "worklet-paint-import-data",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for worklet-paint-import-data to same-https origin and downgrade redirection from https context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/upgrade-insecure-requests/gen/srcdoc-inherit.meta/unset/worklet-paint.https.html b/testing/web-platform/tests/upgrade-insecure-requests/gen/srcdoc-inherit.meta/unset/worklet-paint.https.html
new file mode 100644
index 0000000000..62a48a1661
--- /dev/null
+++ b/testing/web-platform/tests/upgrade-insecure-requests/gen/srcdoc-inherit.meta/unset/worklet-paint.https.html
@@ -0,0 +1,112 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec upgrade-insecure-requests/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "blocked",
+ "origin": "cross-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "srcdoc"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "worklet-paint",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for worklet-paint to cross-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "cross-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "srcdoc"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "worklet-paint",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for worklet-paint to cross-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "cross-https",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "srcdoc"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "worklet-paint",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for worklet-paint to cross-https origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "same-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "srcdoc"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "worklet-paint",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for worklet-paint to same-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "same-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "srcdoc"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "worklet-paint",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for worklet-paint to same-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "same-https",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "srcdoc"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "worklet-paint",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for worklet-paint to same-https origin and downgrade redirection from https context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/upgrade-insecure-requests/gen/srcdoc-inherit.meta/unset/xhr.https.html b/testing/web-platform/tests/upgrade-insecure-requests/gen/srcdoc-inherit.meta/unset/xhr.https.html
new file mode 100644
index 0000000000..3b5047d512
--- /dev/null
+++ b/testing/web-platform/tests/upgrade-insecure-requests/gen/srcdoc-inherit.meta/unset/xhr.https.html
@@ -0,0 +1,112 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec upgrade-insecure-requests/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "blocked",
+ "origin": "cross-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "srcdoc"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for xhr to cross-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "cross-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "srcdoc"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for xhr to cross-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "cross-https",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "srcdoc"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for xhr to cross-https origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "same-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "srcdoc"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for xhr to same-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "same-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "srcdoc"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for xhr to same-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "same-https",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "srcdoc"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for xhr to same-https origin and downgrade redirection from https context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/upgrade-insecure-requests/gen/srcdoc-inherit.meta/upgrade/fetch.https.html b/testing/web-platform/tests/upgrade-insecure-requests/gen/srcdoc-inherit.meta/upgrade/fetch.https.html
new file mode 100644
index 0000000000..117e32f3f5
--- /dev/null
+++ b/testing/web-platform/tests/upgrade-insecure-requests/gen/srcdoc-inherit.meta/upgrade/fetch.https.html
@@ -0,0 +1,113 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec upgrade-insecure-requests/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "allowed",
+ "origin": "cross-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "srcdoc"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for fetch to cross-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "cross-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "srcdoc"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for fetch to cross-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "cross-https",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "srcdoc"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for fetch to cross-https origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "srcdoc"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for fetch to same-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "srcdoc"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for fetch to same-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-https",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "srcdoc"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for fetch to same-https origin and downgrade redirection from https context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/upgrade-insecure-requests/gen/srcdoc-inherit.meta/upgrade/iframe-tag.https.html b/testing/web-platform/tests/upgrade-insecure-requests/gen/srcdoc-inherit.meta/upgrade/iframe-tag.https.html
new file mode 100644
index 0000000000..679cb54eb2
--- /dev/null
+++ b/testing/web-platform/tests/upgrade-insecure-requests/gen/srcdoc-inherit.meta/upgrade/iframe-tag.https.html
@@ -0,0 +1,113 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec upgrade-insecure-requests/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "allowed",
+ "origin": "cross-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "srcdoc"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for iframe-tag to cross-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "cross-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "srcdoc"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for iframe-tag to cross-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "cross-https",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "srcdoc"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for iframe-tag to cross-https origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "srcdoc"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for iframe-tag to same-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "srcdoc"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for iframe-tag to same-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-https",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "srcdoc"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for iframe-tag to same-https origin and downgrade redirection from https context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/upgrade-insecure-requests/gen/srcdoc-inherit.meta/upgrade/img-tag.https.html b/testing/web-platform/tests/upgrade-insecure-requests/gen/srcdoc-inherit.meta/upgrade/img-tag.https.html
new file mode 100644
index 0000000000..e9744a3aec
--- /dev/null
+++ b/testing/web-platform/tests/upgrade-insecure-requests/gen/srcdoc-inherit.meta/upgrade/img-tag.https.html
@@ -0,0 +1,113 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec upgrade-insecure-requests/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "allowed",
+ "origin": "cross-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "srcdoc"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for img-tag to cross-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "cross-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "srcdoc"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for img-tag to cross-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "cross-https",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "srcdoc"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for img-tag to cross-https origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "srcdoc"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for img-tag to same-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "srcdoc"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for img-tag to same-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-https",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "srcdoc"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for img-tag to same-https origin and downgrade redirection from https context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/upgrade-insecure-requests/gen/srcdoc-inherit.meta/upgrade/sharedworker-classic.https.html b/testing/web-platform/tests/upgrade-insecure-requests/gen/srcdoc-inherit.meta/upgrade/sharedworker-classic.https.html
new file mode 100644
index 0000000000..3be481acf3
--- /dev/null
+++ b/testing/web-platform/tests/upgrade-insecure-requests/gen/srcdoc-inherit.meta/upgrade/sharedworker-classic.https.html
@@ -0,0 +1,68 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec upgrade-insecure-requests/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "allowed",
+ "origin": "same-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "srcdoc"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "sharedworker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for sharedworker-classic to same-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "srcdoc"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "sharedworker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for sharedworker-classic to same-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-https",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "srcdoc"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "sharedworker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for sharedworker-classic to same-https origin and downgrade redirection from https context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/upgrade-insecure-requests/gen/srcdoc-inherit.meta/upgrade/sharedworker-import-data.https.html b/testing/web-platform/tests/upgrade-insecure-requests/gen/srcdoc-inherit.meta/upgrade/sharedworker-import-data.https.html
new file mode 100644
index 0000000000..cbd2fabdea
--- /dev/null
+++ b/testing/web-platform/tests/upgrade-insecure-requests/gen/srcdoc-inherit.meta/upgrade/sharedworker-import-data.https.html
@@ -0,0 +1,113 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec upgrade-insecure-requests/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "allowed",
+ "origin": "cross-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "srcdoc"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "sharedworker-import-data",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for sharedworker-import-data to cross-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "cross-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "srcdoc"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "sharedworker-import-data",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for sharedworker-import-data to cross-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "cross-https",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "srcdoc"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "sharedworker-import-data",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for sharedworker-import-data to cross-https origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "srcdoc"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "sharedworker-import-data",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for sharedworker-import-data to same-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "srcdoc"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "sharedworker-import-data",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for sharedworker-import-data to same-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-https",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "srcdoc"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "sharedworker-import-data",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for sharedworker-import-data to same-https origin and downgrade redirection from https context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/upgrade-insecure-requests/gen/srcdoc-inherit.meta/upgrade/sharedworker-import.https.html b/testing/web-platform/tests/upgrade-insecure-requests/gen/srcdoc-inherit.meta/upgrade/sharedworker-import.https.html
new file mode 100644
index 0000000000..b2444a8c8a
--- /dev/null
+++ b/testing/web-platform/tests/upgrade-insecure-requests/gen/srcdoc-inherit.meta/upgrade/sharedworker-import.https.html
@@ -0,0 +1,113 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec upgrade-insecure-requests/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "allowed",
+ "origin": "cross-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "srcdoc"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "sharedworker-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for sharedworker-import to cross-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "cross-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "srcdoc"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "sharedworker-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for sharedworker-import to cross-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "cross-https",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "srcdoc"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "sharedworker-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for sharedworker-import to cross-https origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "srcdoc"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "sharedworker-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for sharedworker-import to same-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "srcdoc"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "sharedworker-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for sharedworker-import to same-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-https",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "srcdoc"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "sharedworker-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for sharedworker-import to same-https origin and downgrade redirection from https context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/upgrade-insecure-requests/gen/srcdoc-inherit.meta/upgrade/sharedworker-module.https.html b/testing/web-platform/tests/upgrade-insecure-requests/gen/srcdoc-inherit.meta/upgrade/sharedworker-module.https.html
new file mode 100644
index 0000000000..91e6ecd08e
--- /dev/null
+++ b/testing/web-platform/tests/upgrade-insecure-requests/gen/srcdoc-inherit.meta/upgrade/sharedworker-module.https.html
@@ -0,0 +1,68 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec upgrade-insecure-requests/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "allowed",
+ "origin": "same-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "srcdoc"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "sharedworker-module",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for sharedworker-module to same-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "srcdoc"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "sharedworker-module",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for sharedworker-module to same-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-https",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "srcdoc"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "sharedworker-module",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for sharedworker-module to same-https origin and downgrade redirection from https context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/upgrade-insecure-requests/gen/srcdoc-inherit.meta/upgrade/websocket.https.html b/testing/web-platform/tests/upgrade-insecure-requests/gen/srcdoc-inherit.meta/upgrade/websocket.https.html
new file mode 100644
index 0000000000..c7f3c265d8
--- /dev/null
+++ b/testing/web-platform/tests/upgrade-insecure-requests/gen/srcdoc-inherit.meta/upgrade/websocket.https.html
@@ -0,0 +1,53 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec upgrade-insecure-requests/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "allowed",
+ "origin": "cross-ws-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "srcdoc"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "websocket",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for websocket to cross-ws-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-ws-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "srcdoc"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "websocket",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for websocket to same-ws-downgrade origin and no-redirect redirection from https context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/upgrade-insecure-requests/gen/srcdoc-inherit.meta/upgrade/worker-classic.https.html b/testing/web-platform/tests/upgrade-insecure-requests/gen/srcdoc-inherit.meta/upgrade/worker-classic.https.html
new file mode 100644
index 0000000000..7c0677a61c
--- /dev/null
+++ b/testing/web-platform/tests/upgrade-insecure-requests/gen/srcdoc-inherit.meta/upgrade/worker-classic.https.html
@@ -0,0 +1,68 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec upgrade-insecure-requests/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "allowed",
+ "origin": "same-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "srcdoc"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "worker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for worker-classic to same-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "srcdoc"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "worker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for worker-classic to same-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-https",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "srcdoc"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "worker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for worker-classic to same-https origin and downgrade redirection from https context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/upgrade-insecure-requests/gen/srcdoc-inherit.meta/upgrade/worker-import-data.https.html b/testing/web-platform/tests/upgrade-insecure-requests/gen/srcdoc-inherit.meta/upgrade/worker-import-data.https.html
new file mode 100644
index 0000000000..f90e9bd4a8
--- /dev/null
+++ b/testing/web-platform/tests/upgrade-insecure-requests/gen/srcdoc-inherit.meta/upgrade/worker-import-data.https.html
@@ -0,0 +1,113 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec upgrade-insecure-requests/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "allowed",
+ "origin": "cross-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "srcdoc"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "worker-import-data",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for worker-import-data to cross-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "cross-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "srcdoc"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "worker-import-data",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for worker-import-data to cross-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "cross-https",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "srcdoc"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "worker-import-data",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for worker-import-data to cross-https origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "srcdoc"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "worker-import-data",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for worker-import-data to same-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "srcdoc"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "worker-import-data",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for worker-import-data to same-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-https",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "srcdoc"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "worker-import-data",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for worker-import-data to same-https origin and downgrade redirection from https context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/upgrade-insecure-requests/gen/srcdoc-inherit.meta/upgrade/worker-import.https.html b/testing/web-platform/tests/upgrade-insecure-requests/gen/srcdoc-inherit.meta/upgrade/worker-import.https.html
new file mode 100644
index 0000000000..a8370a0a6f
--- /dev/null
+++ b/testing/web-platform/tests/upgrade-insecure-requests/gen/srcdoc-inherit.meta/upgrade/worker-import.https.html
@@ -0,0 +1,113 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec upgrade-insecure-requests/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "allowed",
+ "origin": "cross-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "srcdoc"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "worker-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for worker-import to cross-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "cross-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "srcdoc"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "worker-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for worker-import to cross-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "cross-https",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "srcdoc"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "worker-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for worker-import to cross-https origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "srcdoc"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "worker-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for worker-import to same-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "srcdoc"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "worker-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for worker-import to same-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-https",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "srcdoc"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "worker-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for worker-import to same-https origin and downgrade redirection from https context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/upgrade-insecure-requests/gen/srcdoc-inherit.meta/upgrade/worker-module.https.html b/testing/web-platform/tests/upgrade-insecure-requests/gen/srcdoc-inherit.meta/upgrade/worker-module.https.html
new file mode 100644
index 0000000000..ccd461add2
--- /dev/null
+++ b/testing/web-platform/tests/upgrade-insecure-requests/gen/srcdoc-inherit.meta/upgrade/worker-module.https.html
@@ -0,0 +1,68 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec upgrade-insecure-requests/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "allowed",
+ "origin": "same-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "srcdoc"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "worker-module",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for worker-module to same-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "srcdoc"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "worker-module",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for worker-module to same-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-https",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "srcdoc"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "worker-module",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for worker-module to same-https origin and downgrade redirection from https context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/upgrade-insecure-requests/gen/srcdoc-inherit.meta/upgrade/worklet-animation-import-data.https.html b/testing/web-platform/tests/upgrade-insecure-requests/gen/srcdoc-inherit.meta/upgrade/worklet-animation-import-data.https.html
new file mode 100644
index 0000000000..c34a6d0782
--- /dev/null
+++ b/testing/web-platform/tests/upgrade-insecure-requests/gen/srcdoc-inherit.meta/upgrade/worklet-animation-import-data.https.html
@@ -0,0 +1,113 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec upgrade-insecure-requests/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "allowed",
+ "origin": "cross-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "srcdoc"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "worklet-animation-import-data",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for worklet-animation-import-data to cross-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "cross-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "srcdoc"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "worklet-animation-import-data",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for worklet-animation-import-data to cross-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "cross-https",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "srcdoc"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "worklet-animation-import-data",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for worklet-animation-import-data to cross-https origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "srcdoc"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "worklet-animation-import-data",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for worklet-animation-import-data to same-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "srcdoc"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "worklet-animation-import-data",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for worklet-animation-import-data to same-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-https",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "srcdoc"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "worklet-animation-import-data",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for worklet-animation-import-data to same-https origin and downgrade redirection from https context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/upgrade-insecure-requests/gen/srcdoc-inherit.meta/upgrade/worklet-animation.https.html b/testing/web-platform/tests/upgrade-insecure-requests/gen/srcdoc-inherit.meta/upgrade/worklet-animation.https.html
new file mode 100644
index 0000000000..6be85c5e45
--- /dev/null
+++ b/testing/web-platform/tests/upgrade-insecure-requests/gen/srcdoc-inherit.meta/upgrade/worklet-animation.https.html
@@ -0,0 +1,113 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec upgrade-insecure-requests/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "allowed",
+ "origin": "cross-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "srcdoc"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "worklet-animation",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for worklet-animation to cross-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "cross-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "srcdoc"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "worklet-animation",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for worklet-animation to cross-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "cross-https",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "srcdoc"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "worklet-animation",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for worklet-animation to cross-https origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "srcdoc"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "worklet-animation",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for worklet-animation to same-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "srcdoc"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "worklet-animation",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for worklet-animation to same-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-https",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "srcdoc"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "worklet-animation",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for worklet-animation to same-https origin and downgrade redirection from https context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/upgrade-insecure-requests/gen/srcdoc-inherit.meta/upgrade/worklet-audio-import-data.https.html b/testing/web-platform/tests/upgrade-insecure-requests/gen/srcdoc-inherit.meta/upgrade/worklet-audio-import-data.https.html
new file mode 100644
index 0000000000..b0ee36fa6f
--- /dev/null
+++ b/testing/web-platform/tests/upgrade-insecure-requests/gen/srcdoc-inherit.meta/upgrade/worklet-audio-import-data.https.html
@@ -0,0 +1,113 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec upgrade-insecure-requests/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "allowed",
+ "origin": "cross-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "srcdoc"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "worklet-audio-import-data",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for worklet-audio-import-data to cross-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "cross-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "srcdoc"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "worklet-audio-import-data",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for worklet-audio-import-data to cross-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "cross-https",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "srcdoc"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "worklet-audio-import-data",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for worklet-audio-import-data to cross-https origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "srcdoc"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "worklet-audio-import-data",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for worklet-audio-import-data to same-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "srcdoc"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "worklet-audio-import-data",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for worklet-audio-import-data to same-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-https",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "srcdoc"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "worklet-audio-import-data",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for worklet-audio-import-data to same-https origin and downgrade redirection from https context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/upgrade-insecure-requests/gen/srcdoc-inherit.meta/upgrade/worklet-audio.https.html b/testing/web-platform/tests/upgrade-insecure-requests/gen/srcdoc-inherit.meta/upgrade/worklet-audio.https.html
new file mode 100644
index 0000000000..9636d3f557
--- /dev/null
+++ b/testing/web-platform/tests/upgrade-insecure-requests/gen/srcdoc-inherit.meta/upgrade/worklet-audio.https.html
@@ -0,0 +1,113 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec upgrade-insecure-requests/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "allowed",
+ "origin": "cross-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "srcdoc"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "worklet-audio",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for worklet-audio to cross-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "cross-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "srcdoc"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "worklet-audio",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for worklet-audio to cross-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "cross-https",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "srcdoc"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "worklet-audio",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for worklet-audio to cross-https origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "srcdoc"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "worklet-audio",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for worklet-audio to same-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "srcdoc"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "worklet-audio",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for worklet-audio to same-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-https",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "srcdoc"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "worklet-audio",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for worklet-audio to same-https origin and downgrade redirection from https context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/upgrade-insecure-requests/gen/srcdoc-inherit.meta/upgrade/worklet-layout-import-data.https.html b/testing/web-platform/tests/upgrade-insecure-requests/gen/srcdoc-inherit.meta/upgrade/worklet-layout-import-data.https.html
new file mode 100644
index 0000000000..a0b031e499
--- /dev/null
+++ b/testing/web-platform/tests/upgrade-insecure-requests/gen/srcdoc-inherit.meta/upgrade/worklet-layout-import-data.https.html
@@ -0,0 +1,113 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec upgrade-insecure-requests/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "allowed",
+ "origin": "cross-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "srcdoc"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "worklet-layout-import-data",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for worklet-layout-import-data to cross-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "cross-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "srcdoc"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "worklet-layout-import-data",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for worklet-layout-import-data to cross-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "cross-https",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "srcdoc"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "worklet-layout-import-data",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for worklet-layout-import-data to cross-https origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "srcdoc"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "worklet-layout-import-data",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for worklet-layout-import-data to same-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "srcdoc"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "worklet-layout-import-data",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for worklet-layout-import-data to same-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-https",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "srcdoc"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "worklet-layout-import-data",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for worklet-layout-import-data to same-https origin and downgrade redirection from https context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/upgrade-insecure-requests/gen/srcdoc-inherit.meta/upgrade/worklet-layout.https.html b/testing/web-platform/tests/upgrade-insecure-requests/gen/srcdoc-inherit.meta/upgrade/worklet-layout.https.html
new file mode 100644
index 0000000000..663d0b8238
--- /dev/null
+++ b/testing/web-platform/tests/upgrade-insecure-requests/gen/srcdoc-inherit.meta/upgrade/worklet-layout.https.html
@@ -0,0 +1,113 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec upgrade-insecure-requests/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "allowed",
+ "origin": "cross-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "srcdoc"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "worklet-layout",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for worklet-layout to cross-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "cross-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "srcdoc"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "worklet-layout",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for worklet-layout to cross-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "cross-https",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "srcdoc"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "worklet-layout",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for worklet-layout to cross-https origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "srcdoc"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "worklet-layout",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for worklet-layout to same-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "srcdoc"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "worklet-layout",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for worklet-layout to same-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-https",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "srcdoc"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "worklet-layout",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for worklet-layout to same-https origin and downgrade redirection from https context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/upgrade-insecure-requests/gen/srcdoc-inherit.meta/upgrade/worklet-paint-import-data.https.html b/testing/web-platform/tests/upgrade-insecure-requests/gen/srcdoc-inherit.meta/upgrade/worklet-paint-import-data.https.html
new file mode 100644
index 0000000000..48d3177522
--- /dev/null
+++ b/testing/web-platform/tests/upgrade-insecure-requests/gen/srcdoc-inherit.meta/upgrade/worklet-paint-import-data.https.html
@@ -0,0 +1,113 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec upgrade-insecure-requests/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "allowed",
+ "origin": "cross-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "srcdoc"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "worklet-paint-import-data",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for worklet-paint-import-data to cross-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "cross-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "srcdoc"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "worklet-paint-import-data",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for worklet-paint-import-data to cross-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "cross-https",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "srcdoc"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "worklet-paint-import-data",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for worklet-paint-import-data to cross-https origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "srcdoc"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "worklet-paint-import-data",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for worklet-paint-import-data to same-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "srcdoc"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "worklet-paint-import-data",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for worklet-paint-import-data to same-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-https",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "srcdoc"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "worklet-paint-import-data",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for worklet-paint-import-data to same-https origin and downgrade redirection from https context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/upgrade-insecure-requests/gen/srcdoc-inherit.meta/upgrade/worklet-paint.https.html b/testing/web-platform/tests/upgrade-insecure-requests/gen/srcdoc-inherit.meta/upgrade/worklet-paint.https.html
new file mode 100644
index 0000000000..69a4c90ec6
--- /dev/null
+++ b/testing/web-platform/tests/upgrade-insecure-requests/gen/srcdoc-inherit.meta/upgrade/worklet-paint.https.html
@@ -0,0 +1,113 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec upgrade-insecure-requests/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "allowed",
+ "origin": "cross-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "srcdoc"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "worklet-paint",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for worklet-paint to cross-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "cross-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "srcdoc"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "worklet-paint",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for worklet-paint to cross-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "cross-https",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "srcdoc"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "worklet-paint",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for worklet-paint to cross-https origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "srcdoc"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "worklet-paint",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for worklet-paint to same-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "srcdoc"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "worklet-paint",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for worklet-paint to same-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-https",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "srcdoc"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "worklet-paint",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for worklet-paint to same-https origin and downgrade redirection from https context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/upgrade-insecure-requests/gen/srcdoc-inherit.meta/upgrade/xhr.https.html b/testing/web-platform/tests/upgrade-insecure-requests/gen/srcdoc-inherit.meta/upgrade/xhr.https.html
new file mode 100644
index 0000000000..c326a81661
--- /dev/null
+++ b/testing/web-platform/tests/upgrade-insecure-requests/gen/srcdoc-inherit.meta/upgrade/xhr.https.html
@@ -0,0 +1,113 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec upgrade-insecure-requests/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "allowed",
+ "origin": "cross-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "srcdoc"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for xhr to cross-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "cross-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "srcdoc"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for xhr to cross-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "cross-https",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "srcdoc"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for xhr to cross-https origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "srcdoc"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for xhr to same-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "srcdoc"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for xhr to same-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-https",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "srcdoc"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for xhr to same-https origin and downgrade redirection from https context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/upgrade-insecure-requests/gen/top.http-rp/upgrade/fetch.https.html b/testing/web-platform/tests/upgrade-insecure-requests/gen/top.http-rp/upgrade/fetch.https.html
new file mode 100644
index 0000000000..ff9f627f55
--- /dev/null
+++ b/testing/web-platform/tests/upgrade-insecure-requests/gen/top.http-rp/upgrade/fetch.https.html
@@ -0,0 +1,82 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec upgrade-insecure-requests/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "allowed",
+ "origin": "cross-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for fetch to cross-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "cross-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for fetch to cross-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "cross-https",
+ "redirection": "downgrade",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for fetch to cross-https origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for fetch to same-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for fetch to same-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-https",
+ "redirection": "downgrade",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for fetch to same-https origin and downgrade redirection from https context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/upgrade-insecure-requests/gen/top.http-rp/upgrade/fetch.https.html.headers b/testing/web-platform/tests/upgrade-insecure-requests/gen/top.http-rp/upgrade/fetch.https.html.headers
new file mode 100644
index 0000000000..602d9dc38d
--- /dev/null
+++ b/testing/web-platform/tests/upgrade-insecure-requests/gen/top.http-rp/upgrade/fetch.https.html.headers
@@ -0,0 +1 @@
+Content-Security-Policy: upgrade-insecure-requests
diff --git a/testing/web-platform/tests/upgrade-insecure-requests/gen/top.http-rp/upgrade/iframe-tag.https.html b/testing/web-platform/tests/upgrade-insecure-requests/gen/top.http-rp/upgrade/iframe-tag.https.html
new file mode 100644
index 0000000000..d78bcbd801
--- /dev/null
+++ b/testing/web-platform/tests/upgrade-insecure-requests/gen/top.http-rp/upgrade/iframe-tag.https.html
@@ -0,0 +1,82 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec upgrade-insecure-requests/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "allowed",
+ "origin": "cross-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for iframe-tag to cross-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "cross-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for iframe-tag to cross-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "cross-https",
+ "redirection": "downgrade",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for iframe-tag to cross-https origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for iframe-tag to same-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for iframe-tag to same-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-https",
+ "redirection": "downgrade",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for iframe-tag to same-https origin and downgrade redirection from https context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/upgrade-insecure-requests/gen/top.http-rp/upgrade/iframe-tag.https.html.headers b/testing/web-platform/tests/upgrade-insecure-requests/gen/top.http-rp/upgrade/iframe-tag.https.html.headers
new file mode 100644
index 0000000000..602d9dc38d
--- /dev/null
+++ b/testing/web-platform/tests/upgrade-insecure-requests/gen/top.http-rp/upgrade/iframe-tag.https.html.headers
@@ -0,0 +1 @@
+Content-Security-Policy: upgrade-insecure-requests
diff --git a/testing/web-platform/tests/upgrade-insecure-requests/gen/top.http-rp/upgrade/img-tag.https.html b/testing/web-platform/tests/upgrade-insecure-requests/gen/top.http-rp/upgrade/img-tag.https.html
new file mode 100644
index 0000000000..9950b5b5f5
--- /dev/null
+++ b/testing/web-platform/tests/upgrade-insecure-requests/gen/top.http-rp/upgrade/img-tag.https.html
@@ -0,0 +1,82 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec upgrade-insecure-requests/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "allowed",
+ "origin": "cross-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for img-tag to cross-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "cross-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for img-tag to cross-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "cross-https",
+ "redirection": "downgrade",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for img-tag to cross-https origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for img-tag to same-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for img-tag to same-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-https",
+ "redirection": "downgrade",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for img-tag to same-https origin and downgrade redirection from https context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/upgrade-insecure-requests/gen/top.http-rp/upgrade/img-tag.https.html.headers b/testing/web-platform/tests/upgrade-insecure-requests/gen/top.http-rp/upgrade/img-tag.https.html.headers
new file mode 100644
index 0000000000..602d9dc38d
--- /dev/null
+++ b/testing/web-platform/tests/upgrade-insecure-requests/gen/top.http-rp/upgrade/img-tag.https.html.headers
@@ -0,0 +1 @@
+Content-Security-Policy: upgrade-insecure-requests
diff --git a/testing/web-platform/tests/upgrade-insecure-requests/gen/top.http-rp/upgrade/sharedworker-classic.https.html b/testing/web-platform/tests/upgrade-insecure-requests/gen/top.http-rp/upgrade/sharedworker-classic.https.html
new file mode 100644
index 0000000000..677dfad716
--- /dev/null
+++ b/testing/web-platform/tests/upgrade-insecure-requests/gen/top.http-rp/upgrade/sharedworker-classic.https.html
@@ -0,0 +1,52 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec upgrade-insecure-requests/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "allowed",
+ "origin": "same-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "sharedworker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for sharedworker-classic to same-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "sharedworker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for sharedworker-classic to same-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-https",
+ "redirection": "downgrade",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "sharedworker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for sharedworker-classic to same-https origin and downgrade redirection from https context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/upgrade-insecure-requests/gen/top.http-rp/upgrade/sharedworker-classic.https.html.headers b/testing/web-platform/tests/upgrade-insecure-requests/gen/top.http-rp/upgrade/sharedworker-classic.https.html.headers
new file mode 100644
index 0000000000..602d9dc38d
--- /dev/null
+++ b/testing/web-platform/tests/upgrade-insecure-requests/gen/top.http-rp/upgrade/sharedworker-classic.https.html.headers
@@ -0,0 +1 @@
+Content-Security-Policy: upgrade-insecure-requests
diff --git a/testing/web-platform/tests/upgrade-insecure-requests/gen/top.http-rp/upgrade/sharedworker-import-data.https.html b/testing/web-platform/tests/upgrade-insecure-requests/gen/top.http-rp/upgrade/sharedworker-import-data.https.html
new file mode 100644
index 0000000000..7e268a47af
--- /dev/null
+++ b/testing/web-platform/tests/upgrade-insecure-requests/gen/top.http-rp/upgrade/sharedworker-import-data.https.html
@@ -0,0 +1,82 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec upgrade-insecure-requests/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "allowed",
+ "origin": "cross-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "sharedworker-import-data",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for sharedworker-import-data to cross-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "cross-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "sharedworker-import-data",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for sharedworker-import-data to cross-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "cross-https",
+ "redirection": "downgrade",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "sharedworker-import-data",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for sharedworker-import-data to cross-https origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "sharedworker-import-data",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for sharedworker-import-data to same-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "sharedworker-import-data",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for sharedworker-import-data to same-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-https",
+ "redirection": "downgrade",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "sharedworker-import-data",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for sharedworker-import-data to same-https origin and downgrade redirection from https context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/upgrade-insecure-requests/gen/top.http-rp/upgrade/sharedworker-import-data.https.html.headers b/testing/web-platform/tests/upgrade-insecure-requests/gen/top.http-rp/upgrade/sharedworker-import-data.https.html.headers
new file mode 100644
index 0000000000..602d9dc38d
--- /dev/null
+++ b/testing/web-platform/tests/upgrade-insecure-requests/gen/top.http-rp/upgrade/sharedworker-import-data.https.html.headers
@@ -0,0 +1 @@
+Content-Security-Policy: upgrade-insecure-requests
diff --git a/testing/web-platform/tests/upgrade-insecure-requests/gen/top.http-rp/upgrade/sharedworker-import.https.html b/testing/web-platform/tests/upgrade-insecure-requests/gen/top.http-rp/upgrade/sharedworker-import.https.html
new file mode 100644
index 0000000000..3041d08f18
--- /dev/null
+++ b/testing/web-platform/tests/upgrade-insecure-requests/gen/top.http-rp/upgrade/sharedworker-import.https.html
@@ -0,0 +1,82 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec upgrade-insecure-requests/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "allowed",
+ "origin": "cross-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "sharedworker-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for sharedworker-import to cross-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "cross-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "sharedworker-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for sharedworker-import to cross-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "cross-https",
+ "redirection": "downgrade",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "sharedworker-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for sharedworker-import to cross-https origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "sharedworker-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for sharedworker-import to same-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "sharedworker-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for sharedworker-import to same-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-https",
+ "redirection": "downgrade",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "sharedworker-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for sharedworker-import to same-https origin and downgrade redirection from https context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/upgrade-insecure-requests/gen/top.http-rp/upgrade/sharedworker-import.https.html.headers b/testing/web-platform/tests/upgrade-insecure-requests/gen/top.http-rp/upgrade/sharedworker-import.https.html.headers
new file mode 100644
index 0000000000..602d9dc38d
--- /dev/null
+++ b/testing/web-platform/tests/upgrade-insecure-requests/gen/top.http-rp/upgrade/sharedworker-import.https.html.headers
@@ -0,0 +1 @@
+Content-Security-Policy: upgrade-insecure-requests
diff --git a/testing/web-platform/tests/upgrade-insecure-requests/gen/top.http-rp/upgrade/sharedworker-module.https.html b/testing/web-platform/tests/upgrade-insecure-requests/gen/top.http-rp/upgrade/sharedworker-module.https.html
new file mode 100644
index 0000000000..4e20a8ab3d
--- /dev/null
+++ b/testing/web-platform/tests/upgrade-insecure-requests/gen/top.http-rp/upgrade/sharedworker-module.https.html
@@ -0,0 +1,52 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec upgrade-insecure-requests/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "allowed",
+ "origin": "same-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "sharedworker-module",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for sharedworker-module to same-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "sharedworker-module",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for sharedworker-module to same-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-https",
+ "redirection": "downgrade",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "sharedworker-module",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for sharedworker-module to same-https origin and downgrade redirection from https context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/upgrade-insecure-requests/gen/top.http-rp/upgrade/sharedworker-module.https.html.headers b/testing/web-platform/tests/upgrade-insecure-requests/gen/top.http-rp/upgrade/sharedworker-module.https.html.headers
new file mode 100644
index 0000000000..602d9dc38d
--- /dev/null
+++ b/testing/web-platform/tests/upgrade-insecure-requests/gen/top.http-rp/upgrade/sharedworker-module.https.html.headers
@@ -0,0 +1 @@
+Content-Security-Policy: upgrade-insecure-requests
diff --git a/testing/web-platform/tests/upgrade-insecure-requests/gen/top.http-rp/upgrade/websocket.https.html b/testing/web-platform/tests/upgrade-insecure-requests/gen/top.http-rp/upgrade/websocket.https.html
new file mode 100644
index 0000000000..5573cace64
--- /dev/null
+++ b/testing/web-platform/tests/upgrade-insecure-requests/gen/top.http-rp/upgrade/websocket.https.html
@@ -0,0 +1,42 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec upgrade-insecure-requests/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "allowed",
+ "origin": "cross-ws-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "websocket",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for websocket to cross-ws-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-ws-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "websocket",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for websocket to same-ws-downgrade origin and no-redirect redirection from https context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/upgrade-insecure-requests/gen/top.http-rp/upgrade/websocket.https.html.headers b/testing/web-platform/tests/upgrade-insecure-requests/gen/top.http-rp/upgrade/websocket.https.html.headers
new file mode 100644
index 0000000000..602d9dc38d
--- /dev/null
+++ b/testing/web-platform/tests/upgrade-insecure-requests/gen/top.http-rp/upgrade/websocket.https.html.headers
@@ -0,0 +1 @@
+Content-Security-Policy: upgrade-insecure-requests
diff --git a/testing/web-platform/tests/upgrade-insecure-requests/gen/top.http-rp/upgrade/worker-classic.https.html b/testing/web-platform/tests/upgrade-insecure-requests/gen/top.http-rp/upgrade/worker-classic.https.html
new file mode 100644
index 0000000000..434818d127
--- /dev/null
+++ b/testing/web-platform/tests/upgrade-insecure-requests/gen/top.http-rp/upgrade/worker-classic.https.html
@@ -0,0 +1,52 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec upgrade-insecure-requests/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "allowed",
+ "origin": "same-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "worker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for worker-classic to same-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "worker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for worker-classic to same-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-https",
+ "redirection": "downgrade",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "worker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for worker-classic to same-https origin and downgrade redirection from https context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/upgrade-insecure-requests/gen/top.http-rp/upgrade/worker-classic.https.html.headers b/testing/web-platform/tests/upgrade-insecure-requests/gen/top.http-rp/upgrade/worker-classic.https.html.headers
new file mode 100644
index 0000000000..602d9dc38d
--- /dev/null
+++ b/testing/web-platform/tests/upgrade-insecure-requests/gen/top.http-rp/upgrade/worker-classic.https.html.headers
@@ -0,0 +1 @@
+Content-Security-Policy: upgrade-insecure-requests
diff --git a/testing/web-platform/tests/upgrade-insecure-requests/gen/top.http-rp/upgrade/worker-import-data.https.html b/testing/web-platform/tests/upgrade-insecure-requests/gen/top.http-rp/upgrade/worker-import-data.https.html
new file mode 100644
index 0000000000..85e1a9c08f
--- /dev/null
+++ b/testing/web-platform/tests/upgrade-insecure-requests/gen/top.http-rp/upgrade/worker-import-data.https.html
@@ -0,0 +1,82 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec upgrade-insecure-requests/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "allowed",
+ "origin": "cross-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "worker-import-data",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for worker-import-data to cross-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "cross-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "worker-import-data",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for worker-import-data to cross-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "cross-https",
+ "redirection": "downgrade",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "worker-import-data",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for worker-import-data to cross-https origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "worker-import-data",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for worker-import-data to same-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "worker-import-data",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for worker-import-data to same-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-https",
+ "redirection": "downgrade",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "worker-import-data",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for worker-import-data to same-https origin and downgrade redirection from https context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/upgrade-insecure-requests/gen/top.http-rp/upgrade/worker-import-data.https.html.headers b/testing/web-platform/tests/upgrade-insecure-requests/gen/top.http-rp/upgrade/worker-import-data.https.html.headers
new file mode 100644
index 0000000000..602d9dc38d
--- /dev/null
+++ b/testing/web-platform/tests/upgrade-insecure-requests/gen/top.http-rp/upgrade/worker-import-data.https.html.headers
@@ -0,0 +1 @@
+Content-Security-Policy: upgrade-insecure-requests
diff --git a/testing/web-platform/tests/upgrade-insecure-requests/gen/top.http-rp/upgrade/worker-import.https.html b/testing/web-platform/tests/upgrade-insecure-requests/gen/top.http-rp/upgrade/worker-import.https.html
new file mode 100644
index 0000000000..7098954a87
--- /dev/null
+++ b/testing/web-platform/tests/upgrade-insecure-requests/gen/top.http-rp/upgrade/worker-import.https.html
@@ -0,0 +1,82 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec upgrade-insecure-requests/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "allowed",
+ "origin": "cross-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "worker-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for worker-import to cross-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "cross-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "worker-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for worker-import to cross-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "cross-https",
+ "redirection": "downgrade",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "worker-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for worker-import to cross-https origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "worker-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for worker-import to same-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "worker-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for worker-import to same-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-https",
+ "redirection": "downgrade",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "worker-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for worker-import to same-https origin and downgrade redirection from https context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/upgrade-insecure-requests/gen/top.http-rp/upgrade/worker-import.https.html.headers b/testing/web-platform/tests/upgrade-insecure-requests/gen/top.http-rp/upgrade/worker-import.https.html.headers
new file mode 100644
index 0000000000..602d9dc38d
--- /dev/null
+++ b/testing/web-platform/tests/upgrade-insecure-requests/gen/top.http-rp/upgrade/worker-import.https.html.headers
@@ -0,0 +1 @@
+Content-Security-Policy: upgrade-insecure-requests
diff --git a/testing/web-platform/tests/upgrade-insecure-requests/gen/top.http-rp/upgrade/worker-module.https.html b/testing/web-platform/tests/upgrade-insecure-requests/gen/top.http-rp/upgrade/worker-module.https.html
new file mode 100644
index 0000000000..5b0dc16408
--- /dev/null
+++ b/testing/web-platform/tests/upgrade-insecure-requests/gen/top.http-rp/upgrade/worker-module.https.html
@@ -0,0 +1,52 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec upgrade-insecure-requests/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "allowed",
+ "origin": "same-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "worker-module",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for worker-module to same-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "worker-module",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for worker-module to same-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-https",
+ "redirection": "downgrade",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "worker-module",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for worker-module to same-https origin and downgrade redirection from https context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/upgrade-insecure-requests/gen/top.http-rp/upgrade/worker-module.https.html.headers b/testing/web-platform/tests/upgrade-insecure-requests/gen/top.http-rp/upgrade/worker-module.https.html.headers
new file mode 100644
index 0000000000..602d9dc38d
--- /dev/null
+++ b/testing/web-platform/tests/upgrade-insecure-requests/gen/top.http-rp/upgrade/worker-module.https.html.headers
@@ -0,0 +1 @@
+Content-Security-Policy: upgrade-insecure-requests
diff --git a/testing/web-platform/tests/upgrade-insecure-requests/gen/top.http-rp/upgrade/worklet-animation-import-data.https.html b/testing/web-platform/tests/upgrade-insecure-requests/gen/top.http-rp/upgrade/worklet-animation-import-data.https.html
new file mode 100644
index 0000000000..a485bfc509
--- /dev/null
+++ b/testing/web-platform/tests/upgrade-insecure-requests/gen/top.http-rp/upgrade/worklet-animation-import-data.https.html
@@ -0,0 +1,82 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec upgrade-insecure-requests/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "allowed",
+ "origin": "cross-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "worklet-animation-import-data",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for worklet-animation-import-data to cross-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "cross-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "worklet-animation-import-data",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for worklet-animation-import-data to cross-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "cross-https",
+ "redirection": "downgrade",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "worklet-animation-import-data",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for worklet-animation-import-data to cross-https origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "worklet-animation-import-data",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for worklet-animation-import-data to same-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "worklet-animation-import-data",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for worklet-animation-import-data to same-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-https",
+ "redirection": "downgrade",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "worklet-animation-import-data",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for worklet-animation-import-data to same-https origin and downgrade redirection from https context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/upgrade-insecure-requests/gen/top.http-rp/upgrade/worklet-animation-import-data.https.html.headers b/testing/web-platform/tests/upgrade-insecure-requests/gen/top.http-rp/upgrade/worklet-animation-import-data.https.html.headers
new file mode 100644
index 0000000000..602d9dc38d
--- /dev/null
+++ b/testing/web-platform/tests/upgrade-insecure-requests/gen/top.http-rp/upgrade/worklet-animation-import-data.https.html.headers
@@ -0,0 +1 @@
+Content-Security-Policy: upgrade-insecure-requests
diff --git a/testing/web-platform/tests/upgrade-insecure-requests/gen/top.http-rp/upgrade/worklet-animation.https.html b/testing/web-platform/tests/upgrade-insecure-requests/gen/top.http-rp/upgrade/worklet-animation.https.html
new file mode 100644
index 0000000000..511ff4625c
--- /dev/null
+++ b/testing/web-platform/tests/upgrade-insecure-requests/gen/top.http-rp/upgrade/worklet-animation.https.html
@@ -0,0 +1,82 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec upgrade-insecure-requests/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "allowed",
+ "origin": "cross-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "worklet-animation",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for worklet-animation to cross-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "cross-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "worklet-animation",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for worklet-animation to cross-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "cross-https",
+ "redirection": "downgrade",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "worklet-animation",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for worklet-animation to cross-https origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "worklet-animation",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for worklet-animation to same-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "worklet-animation",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for worklet-animation to same-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-https",
+ "redirection": "downgrade",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "worklet-animation",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for worklet-animation to same-https origin and downgrade redirection from https context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/upgrade-insecure-requests/gen/top.http-rp/upgrade/worklet-animation.https.html.headers b/testing/web-platform/tests/upgrade-insecure-requests/gen/top.http-rp/upgrade/worklet-animation.https.html.headers
new file mode 100644
index 0000000000..602d9dc38d
--- /dev/null
+++ b/testing/web-platform/tests/upgrade-insecure-requests/gen/top.http-rp/upgrade/worklet-animation.https.html.headers
@@ -0,0 +1 @@
+Content-Security-Policy: upgrade-insecure-requests
diff --git a/testing/web-platform/tests/upgrade-insecure-requests/gen/top.http-rp/upgrade/worklet-audio-import-data.https.html b/testing/web-platform/tests/upgrade-insecure-requests/gen/top.http-rp/upgrade/worklet-audio-import-data.https.html
new file mode 100644
index 0000000000..5822f29c88
--- /dev/null
+++ b/testing/web-platform/tests/upgrade-insecure-requests/gen/top.http-rp/upgrade/worklet-audio-import-data.https.html
@@ -0,0 +1,82 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec upgrade-insecure-requests/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "allowed",
+ "origin": "cross-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "worklet-audio-import-data",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for worklet-audio-import-data to cross-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "cross-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "worklet-audio-import-data",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for worklet-audio-import-data to cross-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "cross-https",
+ "redirection": "downgrade",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "worklet-audio-import-data",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for worklet-audio-import-data to cross-https origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "worklet-audio-import-data",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for worklet-audio-import-data to same-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "worklet-audio-import-data",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for worklet-audio-import-data to same-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-https",
+ "redirection": "downgrade",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "worklet-audio-import-data",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for worklet-audio-import-data to same-https origin and downgrade redirection from https context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/upgrade-insecure-requests/gen/top.http-rp/upgrade/worklet-audio-import-data.https.html.headers b/testing/web-platform/tests/upgrade-insecure-requests/gen/top.http-rp/upgrade/worklet-audio-import-data.https.html.headers
new file mode 100644
index 0000000000..602d9dc38d
--- /dev/null
+++ b/testing/web-platform/tests/upgrade-insecure-requests/gen/top.http-rp/upgrade/worklet-audio-import-data.https.html.headers
@@ -0,0 +1 @@
+Content-Security-Policy: upgrade-insecure-requests
diff --git a/testing/web-platform/tests/upgrade-insecure-requests/gen/top.http-rp/upgrade/worklet-audio.https.html b/testing/web-platform/tests/upgrade-insecure-requests/gen/top.http-rp/upgrade/worklet-audio.https.html
new file mode 100644
index 0000000000..296e8af847
--- /dev/null
+++ b/testing/web-platform/tests/upgrade-insecure-requests/gen/top.http-rp/upgrade/worklet-audio.https.html
@@ -0,0 +1,82 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec upgrade-insecure-requests/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "allowed",
+ "origin": "cross-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "worklet-audio",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for worklet-audio to cross-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "cross-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "worklet-audio",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for worklet-audio to cross-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "cross-https",
+ "redirection": "downgrade",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "worklet-audio",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for worklet-audio to cross-https origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "worklet-audio",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for worklet-audio to same-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "worklet-audio",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for worklet-audio to same-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-https",
+ "redirection": "downgrade",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "worklet-audio",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for worklet-audio to same-https origin and downgrade redirection from https context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/upgrade-insecure-requests/gen/top.http-rp/upgrade/worklet-audio.https.html.headers b/testing/web-platform/tests/upgrade-insecure-requests/gen/top.http-rp/upgrade/worklet-audio.https.html.headers
new file mode 100644
index 0000000000..602d9dc38d
--- /dev/null
+++ b/testing/web-platform/tests/upgrade-insecure-requests/gen/top.http-rp/upgrade/worklet-audio.https.html.headers
@@ -0,0 +1 @@
+Content-Security-Policy: upgrade-insecure-requests
diff --git a/testing/web-platform/tests/upgrade-insecure-requests/gen/top.http-rp/upgrade/worklet-layout-import-data.https.html b/testing/web-platform/tests/upgrade-insecure-requests/gen/top.http-rp/upgrade/worklet-layout-import-data.https.html
new file mode 100644
index 0000000000..b7546cc611
--- /dev/null
+++ b/testing/web-platform/tests/upgrade-insecure-requests/gen/top.http-rp/upgrade/worklet-layout-import-data.https.html
@@ -0,0 +1,82 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec upgrade-insecure-requests/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "allowed",
+ "origin": "cross-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "worklet-layout-import-data",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for worklet-layout-import-data to cross-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "cross-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "worklet-layout-import-data",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for worklet-layout-import-data to cross-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "cross-https",
+ "redirection": "downgrade",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "worklet-layout-import-data",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for worklet-layout-import-data to cross-https origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "worklet-layout-import-data",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for worklet-layout-import-data to same-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "worklet-layout-import-data",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for worklet-layout-import-data to same-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-https",
+ "redirection": "downgrade",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "worklet-layout-import-data",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for worklet-layout-import-data to same-https origin and downgrade redirection from https context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/upgrade-insecure-requests/gen/top.http-rp/upgrade/worklet-layout-import-data.https.html.headers b/testing/web-platform/tests/upgrade-insecure-requests/gen/top.http-rp/upgrade/worklet-layout-import-data.https.html.headers
new file mode 100644
index 0000000000..602d9dc38d
--- /dev/null
+++ b/testing/web-platform/tests/upgrade-insecure-requests/gen/top.http-rp/upgrade/worklet-layout-import-data.https.html.headers
@@ -0,0 +1 @@
+Content-Security-Policy: upgrade-insecure-requests
diff --git a/testing/web-platform/tests/upgrade-insecure-requests/gen/top.http-rp/upgrade/worklet-layout.https.html b/testing/web-platform/tests/upgrade-insecure-requests/gen/top.http-rp/upgrade/worklet-layout.https.html
new file mode 100644
index 0000000000..3ded6cdf25
--- /dev/null
+++ b/testing/web-platform/tests/upgrade-insecure-requests/gen/top.http-rp/upgrade/worklet-layout.https.html
@@ -0,0 +1,82 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec upgrade-insecure-requests/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "allowed",
+ "origin": "cross-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "worklet-layout",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for worklet-layout to cross-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "cross-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "worklet-layout",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for worklet-layout to cross-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "cross-https",
+ "redirection": "downgrade",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "worklet-layout",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for worklet-layout to cross-https origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "worklet-layout",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for worklet-layout to same-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "worklet-layout",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for worklet-layout to same-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-https",
+ "redirection": "downgrade",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "worklet-layout",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for worklet-layout to same-https origin and downgrade redirection from https context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/upgrade-insecure-requests/gen/top.http-rp/upgrade/worklet-layout.https.html.headers b/testing/web-platform/tests/upgrade-insecure-requests/gen/top.http-rp/upgrade/worklet-layout.https.html.headers
new file mode 100644
index 0000000000..602d9dc38d
--- /dev/null
+++ b/testing/web-platform/tests/upgrade-insecure-requests/gen/top.http-rp/upgrade/worklet-layout.https.html.headers
@@ -0,0 +1 @@
+Content-Security-Policy: upgrade-insecure-requests
diff --git a/testing/web-platform/tests/upgrade-insecure-requests/gen/top.http-rp/upgrade/worklet-paint-import-data.https.html b/testing/web-platform/tests/upgrade-insecure-requests/gen/top.http-rp/upgrade/worklet-paint-import-data.https.html
new file mode 100644
index 0000000000..fdc8c9106e
--- /dev/null
+++ b/testing/web-platform/tests/upgrade-insecure-requests/gen/top.http-rp/upgrade/worklet-paint-import-data.https.html
@@ -0,0 +1,82 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec upgrade-insecure-requests/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "allowed",
+ "origin": "cross-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "worklet-paint-import-data",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for worklet-paint-import-data to cross-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "cross-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "worklet-paint-import-data",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for worklet-paint-import-data to cross-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "cross-https",
+ "redirection": "downgrade",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "worklet-paint-import-data",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for worklet-paint-import-data to cross-https origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "worklet-paint-import-data",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for worklet-paint-import-data to same-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "worklet-paint-import-data",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for worklet-paint-import-data to same-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-https",
+ "redirection": "downgrade",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "worklet-paint-import-data",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for worklet-paint-import-data to same-https origin and downgrade redirection from https context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/upgrade-insecure-requests/gen/top.http-rp/upgrade/worklet-paint-import-data.https.html.headers b/testing/web-platform/tests/upgrade-insecure-requests/gen/top.http-rp/upgrade/worklet-paint-import-data.https.html.headers
new file mode 100644
index 0000000000..602d9dc38d
--- /dev/null
+++ b/testing/web-platform/tests/upgrade-insecure-requests/gen/top.http-rp/upgrade/worklet-paint-import-data.https.html.headers
@@ -0,0 +1 @@
+Content-Security-Policy: upgrade-insecure-requests
diff --git a/testing/web-platform/tests/upgrade-insecure-requests/gen/top.http-rp/upgrade/worklet-paint.https.html b/testing/web-platform/tests/upgrade-insecure-requests/gen/top.http-rp/upgrade/worklet-paint.https.html
new file mode 100644
index 0000000000..2646219a98
--- /dev/null
+++ b/testing/web-platform/tests/upgrade-insecure-requests/gen/top.http-rp/upgrade/worklet-paint.https.html
@@ -0,0 +1,82 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec upgrade-insecure-requests/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "allowed",
+ "origin": "cross-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "worklet-paint",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for worklet-paint to cross-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "cross-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "worklet-paint",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for worklet-paint to cross-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "cross-https",
+ "redirection": "downgrade",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "worklet-paint",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for worklet-paint to cross-https origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "worklet-paint",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for worklet-paint to same-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "worklet-paint",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for worklet-paint to same-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-https",
+ "redirection": "downgrade",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "worklet-paint",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for worklet-paint to same-https origin and downgrade redirection from https context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/upgrade-insecure-requests/gen/top.http-rp/upgrade/worklet-paint.https.html.headers b/testing/web-platform/tests/upgrade-insecure-requests/gen/top.http-rp/upgrade/worklet-paint.https.html.headers
new file mode 100644
index 0000000000..602d9dc38d
--- /dev/null
+++ b/testing/web-platform/tests/upgrade-insecure-requests/gen/top.http-rp/upgrade/worklet-paint.https.html.headers
@@ -0,0 +1 @@
+Content-Security-Policy: upgrade-insecure-requests
diff --git a/testing/web-platform/tests/upgrade-insecure-requests/gen/top.http-rp/upgrade/xhr.https.html b/testing/web-platform/tests/upgrade-insecure-requests/gen/top.http-rp/upgrade/xhr.https.html
new file mode 100644
index 0000000000..c85f01adc1
--- /dev/null
+++ b/testing/web-platform/tests/upgrade-insecure-requests/gen/top.http-rp/upgrade/xhr.https.html
@@ -0,0 +1,82 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec upgrade-insecure-requests/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "allowed",
+ "origin": "cross-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for xhr to cross-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "cross-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for xhr to cross-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "cross-https",
+ "redirection": "downgrade",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for xhr to cross-https origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for xhr to same-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for xhr to same-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-https",
+ "redirection": "downgrade",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for xhr to same-https origin and downgrade redirection from https context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/upgrade-insecure-requests/gen/top.http-rp/upgrade/xhr.https.html.headers b/testing/web-platform/tests/upgrade-insecure-requests/gen/top.http-rp/upgrade/xhr.https.html.headers
new file mode 100644
index 0000000000..602d9dc38d
--- /dev/null
+++ b/testing/web-platform/tests/upgrade-insecure-requests/gen/top.http-rp/upgrade/xhr.https.html.headers
@@ -0,0 +1 @@
+Content-Security-Policy: upgrade-insecure-requests
diff --git a/testing/web-platform/tests/upgrade-insecure-requests/gen/top.meta/unset/fetch.https.html b/testing/web-platform/tests/upgrade-insecure-requests/gen/top.meta/unset/fetch.https.html
new file mode 100644
index 0000000000..39148c015b
--- /dev/null
+++ b/testing/web-platform/tests/upgrade-insecure-requests/gen/top.meta/unset/fetch.https.html
@@ -0,0 +1,82 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec upgrade-insecure-requests/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "blocked",
+ "origin": "cross-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for fetch to cross-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "cross-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for fetch to cross-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "cross-https",
+ "redirection": "downgrade",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for fetch to cross-https origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "same-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for fetch to same-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "same-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for fetch to same-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "same-https",
+ "redirection": "downgrade",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for fetch to same-https origin and downgrade redirection from https context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/upgrade-insecure-requests/gen/top.meta/unset/iframe-tag.https.html b/testing/web-platform/tests/upgrade-insecure-requests/gen/top.meta/unset/iframe-tag.https.html
new file mode 100644
index 0000000000..12ef5a5b70
--- /dev/null
+++ b/testing/web-platform/tests/upgrade-insecure-requests/gen/top.meta/unset/iframe-tag.https.html
@@ -0,0 +1,82 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec upgrade-insecure-requests/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "blocked",
+ "origin": "cross-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for iframe-tag to cross-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "cross-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for iframe-tag to cross-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "cross-https",
+ "redirection": "downgrade",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for iframe-tag to cross-https origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "same-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for iframe-tag to same-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "same-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for iframe-tag to same-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "same-https",
+ "redirection": "downgrade",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for iframe-tag to same-https origin and downgrade redirection from https context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/upgrade-insecure-requests/gen/top.meta/unset/img-tag.https.html b/testing/web-platform/tests/upgrade-insecure-requests/gen/top.meta/unset/img-tag.https.html
new file mode 100644
index 0000000000..a78db7560a
--- /dev/null
+++ b/testing/web-platform/tests/upgrade-insecure-requests/gen/top.meta/unset/img-tag.https.html
@@ -0,0 +1,82 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec upgrade-insecure-requests/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "blocked",
+ "origin": "cross-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for img-tag to cross-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "cross-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for img-tag to cross-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "cross-https",
+ "redirection": "downgrade",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for img-tag to cross-https origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "same-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for img-tag to same-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "same-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for img-tag to same-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "same-https",
+ "redirection": "downgrade",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for img-tag to same-https origin and downgrade redirection from https context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/upgrade-insecure-requests/gen/top.meta/unset/sharedworker-classic.https.html b/testing/web-platform/tests/upgrade-insecure-requests/gen/top.meta/unset/sharedworker-classic.https.html
new file mode 100644
index 0000000000..4c5295cf7b
--- /dev/null
+++ b/testing/web-platform/tests/upgrade-insecure-requests/gen/top.meta/unset/sharedworker-classic.https.html
@@ -0,0 +1,52 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec upgrade-insecure-requests/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "blocked",
+ "origin": "same-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "sharedworker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for sharedworker-classic to same-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "same-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "sharedworker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for sharedworker-classic to same-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "same-https",
+ "redirection": "downgrade",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "sharedworker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for sharedworker-classic to same-https origin and downgrade redirection from https context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/upgrade-insecure-requests/gen/top.meta/unset/sharedworker-import-data.https.html b/testing/web-platform/tests/upgrade-insecure-requests/gen/top.meta/unset/sharedworker-import-data.https.html
new file mode 100644
index 0000000000..dde524fb0f
--- /dev/null
+++ b/testing/web-platform/tests/upgrade-insecure-requests/gen/top.meta/unset/sharedworker-import-data.https.html
@@ -0,0 +1,82 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec upgrade-insecure-requests/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "blocked",
+ "origin": "cross-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "sharedworker-import-data",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for sharedworker-import-data to cross-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "cross-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "sharedworker-import-data",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for sharedworker-import-data to cross-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "cross-https",
+ "redirection": "downgrade",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "sharedworker-import-data",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for sharedworker-import-data to cross-https origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "same-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "sharedworker-import-data",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for sharedworker-import-data to same-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "same-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "sharedworker-import-data",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for sharedworker-import-data to same-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "same-https",
+ "redirection": "downgrade",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "sharedworker-import-data",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for sharedworker-import-data to same-https origin and downgrade redirection from https context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/upgrade-insecure-requests/gen/top.meta/unset/sharedworker-import.https.html b/testing/web-platform/tests/upgrade-insecure-requests/gen/top.meta/unset/sharedworker-import.https.html
new file mode 100644
index 0000000000..fbba95b65a
--- /dev/null
+++ b/testing/web-platform/tests/upgrade-insecure-requests/gen/top.meta/unset/sharedworker-import.https.html
@@ -0,0 +1,82 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec upgrade-insecure-requests/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "blocked",
+ "origin": "cross-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "sharedworker-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for sharedworker-import to cross-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "cross-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "sharedworker-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for sharedworker-import to cross-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "cross-https",
+ "redirection": "downgrade",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "sharedworker-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for sharedworker-import to cross-https origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "same-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "sharedworker-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for sharedworker-import to same-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "same-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "sharedworker-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for sharedworker-import to same-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "same-https",
+ "redirection": "downgrade",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "sharedworker-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for sharedworker-import to same-https origin and downgrade redirection from https context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/upgrade-insecure-requests/gen/top.meta/unset/sharedworker-module.https.html b/testing/web-platform/tests/upgrade-insecure-requests/gen/top.meta/unset/sharedworker-module.https.html
new file mode 100644
index 0000000000..26776e4df7
--- /dev/null
+++ b/testing/web-platform/tests/upgrade-insecure-requests/gen/top.meta/unset/sharedworker-module.https.html
@@ -0,0 +1,52 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec upgrade-insecure-requests/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "blocked",
+ "origin": "same-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "sharedworker-module",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for sharedworker-module to same-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "same-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "sharedworker-module",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for sharedworker-module to same-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "same-https",
+ "redirection": "downgrade",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "sharedworker-module",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for sharedworker-module to same-https origin and downgrade redirection from https context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/upgrade-insecure-requests/gen/top.meta/unset/websocket.https.html b/testing/web-platform/tests/upgrade-insecure-requests/gen/top.meta/unset/websocket.https.html
new file mode 100644
index 0000000000..e074d9d82e
--- /dev/null
+++ b/testing/web-platform/tests/upgrade-insecure-requests/gen/top.meta/unset/websocket.https.html
@@ -0,0 +1,42 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec upgrade-insecure-requests/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "blocked",
+ "origin": "cross-ws-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "websocket",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for websocket to cross-ws-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "same-ws-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "websocket",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for websocket to same-ws-downgrade origin and no-redirect redirection from https context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/upgrade-insecure-requests/gen/top.meta/unset/worker-classic.https.html b/testing/web-platform/tests/upgrade-insecure-requests/gen/top.meta/unset/worker-classic.https.html
new file mode 100644
index 0000000000..aa01452b64
--- /dev/null
+++ b/testing/web-platform/tests/upgrade-insecure-requests/gen/top.meta/unset/worker-classic.https.html
@@ -0,0 +1,52 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec upgrade-insecure-requests/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "blocked",
+ "origin": "same-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "worker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for worker-classic to same-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "same-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "worker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for worker-classic to same-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "same-https",
+ "redirection": "downgrade",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "worker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for worker-classic to same-https origin and downgrade redirection from https context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/upgrade-insecure-requests/gen/top.meta/unset/worker-import-data.https.html b/testing/web-platform/tests/upgrade-insecure-requests/gen/top.meta/unset/worker-import-data.https.html
new file mode 100644
index 0000000000..3669e03083
--- /dev/null
+++ b/testing/web-platform/tests/upgrade-insecure-requests/gen/top.meta/unset/worker-import-data.https.html
@@ -0,0 +1,82 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec upgrade-insecure-requests/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "blocked",
+ "origin": "cross-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "worker-import-data",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for worker-import-data to cross-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "cross-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "worker-import-data",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for worker-import-data to cross-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "cross-https",
+ "redirection": "downgrade",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "worker-import-data",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for worker-import-data to cross-https origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "same-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "worker-import-data",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for worker-import-data to same-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "same-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "worker-import-data",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for worker-import-data to same-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "same-https",
+ "redirection": "downgrade",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "worker-import-data",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for worker-import-data to same-https origin and downgrade redirection from https context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/upgrade-insecure-requests/gen/top.meta/unset/worker-import.https.html b/testing/web-platform/tests/upgrade-insecure-requests/gen/top.meta/unset/worker-import.https.html
new file mode 100644
index 0000000000..4743c2c910
--- /dev/null
+++ b/testing/web-platform/tests/upgrade-insecure-requests/gen/top.meta/unset/worker-import.https.html
@@ -0,0 +1,82 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec upgrade-insecure-requests/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "blocked",
+ "origin": "cross-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "worker-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for worker-import to cross-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "cross-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "worker-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for worker-import to cross-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "cross-https",
+ "redirection": "downgrade",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "worker-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for worker-import to cross-https origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "same-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "worker-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for worker-import to same-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "same-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "worker-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for worker-import to same-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "same-https",
+ "redirection": "downgrade",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "worker-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for worker-import to same-https origin and downgrade redirection from https context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/upgrade-insecure-requests/gen/top.meta/unset/worker-module.https.html b/testing/web-platform/tests/upgrade-insecure-requests/gen/top.meta/unset/worker-module.https.html
new file mode 100644
index 0000000000..6e5cce8af6
--- /dev/null
+++ b/testing/web-platform/tests/upgrade-insecure-requests/gen/top.meta/unset/worker-module.https.html
@@ -0,0 +1,52 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec upgrade-insecure-requests/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "blocked",
+ "origin": "same-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "worker-module",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for worker-module to same-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "same-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "worker-module",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for worker-module to same-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "same-https",
+ "redirection": "downgrade",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "worker-module",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for worker-module to same-https origin and downgrade redirection from https context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/upgrade-insecure-requests/gen/top.meta/unset/worklet-animation-import-data.https.html b/testing/web-platform/tests/upgrade-insecure-requests/gen/top.meta/unset/worklet-animation-import-data.https.html
new file mode 100644
index 0000000000..4ffc90cd8f
--- /dev/null
+++ b/testing/web-platform/tests/upgrade-insecure-requests/gen/top.meta/unset/worklet-animation-import-data.https.html
@@ -0,0 +1,82 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec upgrade-insecure-requests/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "blocked",
+ "origin": "cross-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "worklet-animation-import-data",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for worklet-animation-import-data to cross-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "cross-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "worklet-animation-import-data",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for worklet-animation-import-data to cross-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "cross-https",
+ "redirection": "downgrade",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "worklet-animation-import-data",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for worklet-animation-import-data to cross-https origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "same-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "worklet-animation-import-data",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for worklet-animation-import-data to same-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "same-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "worklet-animation-import-data",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for worklet-animation-import-data to same-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "same-https",
+ "redirection": "downgrade",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "worklet-animation-import-data",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for worklet-animation-import-data to same-https origin and downgrade redirection from https context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/upgrade-insecure-requests/gen/top.meta/unset/worklet-animation.https.html b/testing/web-platform/tests/upgrade-insecure-requests/gen/top.meta/unset/worklet-animation.https.html
new file mode 100644
index 0000000000..114f59fbea
--- /dev/null
+++ b/testing/web-platform/tests/upgrade-insecure-requests/gen/top.meta/unset/worklet-animation.https.html
@@ -0,0 +1,82 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec upgrade-insecure-requests/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "blocked",
+ "origin": "cross-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "worklet-animation",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for worklet-animation to cross-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "cross-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "worklet-animation",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for worklet-animation to cross-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "cross-https",
+ "redirection": "downgrade",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "worklet-animation",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for worklet-animation to cross-https origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "same-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "worklet-animation",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for worklet-animation to same-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "same-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "worklet-animation",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for worklet-animation to same-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "same-https",
+ "redirection": "downgrade",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "worklet-animation",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for worklet-animation to same-https origin and downgrade redirection from https context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/upgrade-insecure-requests/gen/top.meta/unset/worklet-audio-import-data.https.html b/testing/web-platform/tests/upgrade-insecure-requests/gen/top.meta/unset/worklet-audio-import-data.https.html
new file mode 100644
index 0000000000..cad1c3580d
--- /dev/null
+++ b/testing/web-platform/tests/upgrade-insecure-requests/gen/top.meta/unset/worklet-audio-import-data.https.html
@@ -0,0 +1,82 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec upgrade-insecure-requests/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "blocked",
+ "origin": "cross-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "worklet-audio-import-data",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for worklet-audio-import-data to cross-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "cross-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "worklet-audio-import-data",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for worklet-audio-import-data to cross-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "cross-https",
+ "redirection": "downgrade",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "worklet-audio-import-data",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for worklet-audio-import-data to cross-https origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "same-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "worklet-audio-import-data",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for worklet-audio-import-data to same-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "same-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "worklet-audio-import-data",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for worklet-audio-import-data to same-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "same-https",
+ "redirection": "downgrade",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "worklet-audio-import-data",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for worklet-audio-import-data to same-https origin and downgrade redirection from https context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/upgrade-insecure-requests/gen/top.meta/unset/worklet-audio.https.html b/testing/web-platform/tests/upgrade-insecure-requests/gen/top.meta/unset/worklet-audio.https.html
new file mode 100644
index 0000000000..16ce32b731
--- /dev/null
+++ b/testing/web-platform/tests/upgrade-insecure-requests/gen/top.meta/unset/worklet-audio.https.html
@@ -0,0 +1,82 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec upgrade-insecure-requests/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "blocked",
+ "origin": "cross-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "worklet-audio",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for worklet-audio to cross-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "cross-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "worklet-audio",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for worklet-audio to cross-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "cross-https",
+ "redirection": "downgrade",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "worklet-audio",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for worklet-audio to cross-https origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "same-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "worklet-audio",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for worklet-audio to same-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "same-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "worklet-audio",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for worklet-audio to same-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "same-https",
+ "redirection": "downgrade",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "worklet-audio",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for worklet-audio to same-https origin and downgrade redirection from https context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/upgrade-insecure-requests/gen/top.meta/unset/worklet-layout-import-data.https.html b/testing/web-platform/tests/upgrade-insecure-requests/gen/top.meta/unset/worklet-layout-import-data.https.html
new file mode 100644
index 0000000000..a6c633e97d
--- /dev/null
+++ b/testing/web-platform/tests/upgrade-insecure-requests/gen/top.meta/unset/worklet-layout-import-data.https.html
@@ -0,0 +1,82 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec upgrade-insecure-requests/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "blocked",
+ "origin": "cross-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "worklet-layout-import-data",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for worklet-layout-import-data to cross-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "cross-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "worklet-layout-import-data",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for worklet-layout-import-data to cross-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "cross-https",
+ "redirection": "downgrade",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "worklet-layout-import-data",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for worklet-layout-import-data to cross-https origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "same-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "worklet-layout-import-data",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for worklet-layout-import-data to same-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "same-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "worklet-layout-import-data",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for worklet-layout-import-data to same-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "same-https",
+ "redirection": "downgrade",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "worklet-layout-import-data",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for worklet-layout-import-data to same-https origin and downgrade redirection from https context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/upgrade-insecure-requests/gen/top.meta/unset/worklet-layout.https.html b/testing/web-platform/tests/upgrade-insecure-requests/gen/top.meta/unset/worklet-layout.https.html
new file mode 100644
index 0000000000..9c7f82d9e2
--- /dev/null
+++ b/testing/web-platform/tests/upgrade-insecure-requests/gen/top.meta/unset/worklet-layout.https.html
@@ -0,0 +1,82 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec upgrade-insecure-requests/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "blocked",
+ "origin": "cross-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "worklet-layout",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for worklet-layout to cross-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "cross-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "worklet-layout",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for worklet-layout to cross-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "cross-https",
+ "redirection": "downgrade",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "worklet-layout",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for worklet-layout to cross-https origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "same-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "worklet-layout",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for worklet-layout to same-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "same-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "worklet-layout",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for worklet-layout to same-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "same-https",
+ "redirection": "downgrade",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "worklet-layout",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for worklet-layout to same-https origin and downgrade redirection from https context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/upgrade-insecure-requests/gen/top.meta/unset/worklet-paint-import-data.https.html b/testing/web-platform/tests/upgrade-insecure-requests/gen/top.meta/unset/worklet-paint-import-data.https.html
new file mode 100644
index 0000000000..7b484d0a4c
--- /dev/null
+++ b/testing/web-platform/tests/upgrade-insecure-requests/gen/top.meta/unset/worklet-paint-import-data.https.html
@@ -0,0 +1,82 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec upgrade-insecure-requests/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "blocked",
+ "origin": "cross-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "worklet-paint-import-data",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for worklet-paint-import-data to cross-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "cross-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "worklet-paint-import-data",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for worklet-paint-import-data to cross-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "cross-https",
+ "redirection": "downgrade",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "worklet-paint-import-data",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for worklet-paint-import-data to cross-https origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "same-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "worklet-paint-import-data",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for worklet-paint-import-data to same-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "same-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "worklet-paint-import-data",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for worklet-paint-import-data to same-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "same-https",
+ "redirection": "downgrade",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "worklet-paint-import-data",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for worklet-paint-import-data to same-https origin and downgrade redirection from https context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/upgrade-insecure-requests/gen/top.meta/unset/worklet-paint.https.html b/testing/web-platform/tests/upgrade-insecure-requests/gen/top.meta/unset/worklet-paint.https.html
new file mode 100644
index 0000000000..dcf2a13728
--- /dev/null
+++ b/testing/web-platform/tests/upgrade-insecure-requests/gen/top.meta/unset/worklet-paint.https.html
@@ -0,0 +1,82 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec upgrade-insecure-requests/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "blocked",
+ "origin": "cross-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "worklet-paint",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for worklet-paint to cross-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "cross-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "worklet-paint",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for worklet-paint to cross-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "cross-https",
+ "redirection": "downgrade",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "worklet-paint",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for worklet-paint to cross-https origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "same-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "worklet-paint",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for worklet-paint to same-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "same-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "worklet-paint",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for worklet-paint to same-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "same-https",
+ "redirection": "downgrade",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "worklet-paint",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for worklet-paint to same-https origin and downgrade redirection from https context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/upgrade-insecure-requests/gen/top.meta/unset/xhr.https.html b/testing/web-platform/tests/upgrade-insecure-requests/gen/top.meta/unset/xhr.https.html
new file mode 100644
index 0000000000..ccb4ecf4ac
--- /dev/null
+++ b/testing/web-platform/tests/upgrade-insecure-requests/gen/top.meta/unset/xhr.https.html
@@ -0,0 +1,82 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec upgrade-insecure-requests/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "blocked",
+ "origin": "cross-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for xhr to cross-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "cross-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for xhr to cross-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "cross-https",
+ "redirection": "downgrade",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for xhr to cross-https origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "same-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for xhr to same-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "same-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for xhr to same-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "same-https",
+ "redirection": "downgrade",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for xhr to same-https origin and downgrade redirection from https context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/upgrade-insecure-requests/gen/top.meta/upgrade/fetch.https.html b/testing/web-platform/tests/upgrade-insecure-requests/gen/top.meta/upgrade/fetch.https.html
new file mode 100644
index 0000000000..5b3d886a8a
--- /dev/null
+++ b/testing/web-platform/tests/upgrade-insecure-requests/gen/top.meta/upgrade/fetch.https.html
@@ -0,0 +1,83 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec upgrade-insecure-requests/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "allowed",
+ "origin": "cross-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for fetch to cross-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "cross-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for fetch to cross-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "cross-https",
+ "redirection": "downgrade",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for fetch to cross-https origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for fetch to same-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for fetch to same-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-https",
+ "redirection": "downgrade",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for fetch to same-https origin and downgrade redirection from https context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/upgrade-insecure-requests/gen/top.meta/upgrade/iframe-tag.https.html b/testing/web-platform/tests/upgrade-insecure-requests/gen/top.meta/upgrade/iframe-tag.https.html
new file mode 100644
index 0000000000..76ad9eacc3
--- /dev/null
+++ b/testing/web-platform/tests/upgrade-insecure-requests/gen/top.meta/upgrade/iframe-tag.https.html
@@ -0,0 +1,83 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec upgrade-insecure-requests/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "allowed",
+ "origin": "cross-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for iframe-tag to cross-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "cross-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for iframe-tag to cross-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "cross-https",
+ "redirection": "downgrade",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for iframe-tag to cross-https origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for iframe-tag to same-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for iframe-tag to same-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-https",
+ "redirection": "downgrade",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for iframe-tag to same-https origin and downgrade redirection from https context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/upgrade-insecure-requests/gen/top.meta/upgrade/img-tag.https.html b/testing/web-platform/tests/upgrade-insecure-requests/gen/top.meta/upgrade/img-tag.https.html
new file mode 100644
index 0000000000..6fe8940e13
--- /dev/null
+++ b/testing/web-platform/tests/upgrade-insecure-requests/gen/top.meta/upgrade/img-tag.https.html
@@ -0,0 +1,83 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec upgrade-insecure-requests/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "allowed",
+ "origin": "cross-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for img-tag to cross-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "cross-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for img-tag to cross-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "cross-https",
+ "redirection": "downgrade",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for img-tag to cross-https origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for img-tag to same-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for img-tag to same-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-https",
+ "redirection": "downgrade",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for img-tag to same-https origin and downgrade redirection from https context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/upgrade-insecure-requests/gen/top.meta/upgrade/sharedworker-classic.https.html b/testing/web-platform/tests/upgrade-insecure-requests/gen/top.meta/upgrade/sharedworker-classic.https.html
new file mode 100644
index 0000000000..b8ad00fa47
--- /dev/null
+++ b/testing/web-platform/tests/upgrade-insecure-requests/gen/top.meta/upgrade/sharedworker-classic.https.html
@@ -0,0 +1,53 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec upgrade-insecure-requests/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "allowed",
+ "origin": "same-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "sharedworker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for sharedworker-classic to same-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "sharedworker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for sharedworker-classic to same-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-https",
+ "redirection": "downgrade",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "sharedworker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for sharedworker-classic to same-https origin and downgrade redirection from https context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/upgrade-insecure-requests/gen/top.meta/upgrade/sharedworker-import-data.https.html b/testing/web-platform/tests/upgrade-insecure-requests/gen/top.meta/upgrade/sharedworker-import-data.https.html
new file mode 100644
index 0000000000..3ed3240334
--- /dev/null
+++ b/testing/web-platform/tests/upgrade-insecure-requests/gen/top.meta/upgrade/sharedworker-import-data.https.html
@@ -0,0 +1,83 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec upgrade-insecure-requests/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "allowed",
+ "origin": "cross-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "sharedworker-import-data",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for sharedworker-import-data to cross-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "cross-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "sharedworker-import-data",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for sharedworker-import-data to cross-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "cross-https",
+ "redirection": "downgrade",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "sharedworker-import-data",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for sharedworker-import-data to cross-https origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "sharedworker-import-data",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for sharedworker-import-data to same-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "sharedworker-import-data",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for sharedworker-import-data to same-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-https",
+ "redirection": "downgrade",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "sharedworker-import-data",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for sharedworker-import-data to same-https origin and downgrade redirection from https context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/upgrade-insecure-requests/gen/top.meta/upgrade/sharedworker-import.https.html b/testing/web-platform/tests/upgrade-insecure-requests/gen/top.meta/upgrade/sharedworker-import.https.html
new file mode 100644
index 0000000000..eea7d4dc63
--- /dev/null
+++ b/testing/web-platform/tests/upgrade-insecure-requests/gen/top.meta/upgrade/sharedworker-import.https.html
@@ -0,0 +1,83 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec upgrade-insecure-requests/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "allowed",
+ "origin": "cross-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "sharedworker-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for sharedworker-import to cross-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "cross-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "sharedworker-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for sharedworker-import to cross-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "cross-https",
+ "redirection": "downgrade",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "sharedworker-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for sharedworker-import to cross-https origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "sharedworker-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for sharedworker-import to same-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "sharedworker-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for sharedworker-import to same-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-https",
+ "redirection": "downgrade",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "sharedworker-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for sharedworker-import to same-https origin and downgrade redirection from https context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/upgrade-insecure-requests/gen/top.meta/upgrade/sharedworker-module.https.html b/testing/web-platform/tests/upgrade-insecure-requests/gen/top.meta/upgrade/sharedworker-module.https.html
new file mode 100644
index 0000000000..7ac0ce75a2
--- /dev/null
+++ b/testing/web-platform/tests/upgrade-insecure-requests/gen/top.meta/upgrade/sharedworker-module.https.html
@@ -0,0 +1,53 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec upgrade-insecure-requests/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "allowed",
+ "origin": "same-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "sharedworker-module",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for sharedworker-module to same-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "sharedworker-module",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for sharedworker-module to same-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-https",
+ "redirection": "downgrade",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "sharedworker-module",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for sharedworker-module to same-https origin and downgrade redirection from https context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/upgrade-insecure-requests/gen/top.meta/upgrade/websocket.https.html b/testing/web-platform/tests/upgrade-insecure-requests/gen/top.meta/upgrade/websocket.https.html
new file mode 100644
index 0000000000..fa47869c32
--- /dev/null
+++ b/testing/web-platform/tests/upgrade-insecure-requests/gen/top.meta/upgrade/websocket.https.html
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec upgrade-insecure-requests/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "allowed",
+ "origin": "cross-ws-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "websocket",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for websocket to cross-ws-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-ws-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "websocket",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for websocket to same-ws-downgrade origin and no-redirect redirection from https context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/upgrade-insecure-requests/gen/top.meta/upgrade/worker-classic.https.html b/testing/web-platform/tests/upgrade-insecure-requests/gen/top.meta/upgrade/worker-classic.https.html
new file mode 100644
index 0000000000..376440f7bf
--- /dev/null
+++ b/testing/web-platform/tests/upgrade-insecure-requests/gen/top.meta/upgrade/worker-classic.https.html
@@ -0,0 +1,53 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec upgrade-insecure-requests/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "allowed",
+ "origin": "same-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "worker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for worker-classic to same-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "worker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for worker-classic to same-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-https",
+ "redirection": "downgrade",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "worker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for worker-classic to same-https origin and downgrade redirection from https context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/upgrade-insecure-requests/gen/top.meta/upgrade/worker-import-data.https.html b/testing/web-platform/tests/upgrade-insecure-requests/gen/top.meta/upgrade/worker-import-data.https.html
new file mode 100644
index 0000000000..0cb1533b2a
--- /dev/null
+++ b/testing/web-platform/tests/upgrade-insecure-requests/gen/top.meta/upgrade/worker-import-data.https.html
@@ -0,0 +1,83 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec upgrade-insecure-requests/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "allowed",
+ "origin": "cross-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "worker-import-data",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for worker-import-data to cross-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "cross-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "worker-import-data",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for worker-import-data to cross-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "cross-https",
+ "redirection": "downgrade",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "worker-import-data",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for worker-import-data to cross-https origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "worker-import-data",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for worker-import-data to same-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "worker-import-data",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for worker-import-data to same-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-https",
+ "redirection": "downgrade",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "worker-import-data",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for worker-import-data to same-https origin and downgrade redirection from https context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/upgrade-insecure-requests/gen/top.meta/upgrade/worker-import.https.html b/testing/web-platform/tests/upgrade-insecure-requests/gen/top.meta/upgrade/worker-import.https.html
new file mode 100644
index 0000000000..020dc7946d
--- /dev/null
+++ b/testing/web-platform/tests/upgrade-insecure-requests/gen/top.meta/upgrade/worker-import.https.html
@@ -0,0 +1,83 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec upgrade-insecure-requests/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "allowed",
+ "origin": "cross-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "worker-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for worker-import to cross-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "cross-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "worker-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for worker-import to cross-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "cross-https",
+ "redirection": "downgrade",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "worker-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for worker-import to cross-https origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "worker-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for worker-import to same-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "worker-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for worker-import to same-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-https",
+ "redirection": "downgrade",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "worker-import",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for worker-import to same-https origin and downgrade redirection from https context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/upgrade-insecure-requests/gen/top.meta/upgrade/worker-module.https.html b/testing/web-platform/tests/upgrade-insecure-requests/gen/top.meta/upgrade/worker-module.https.html
new file mode 100644
index 0000000000..c6100c45be
--- /dev/null
+++ b/testing/web-platform/tests/upgrade-insecure-requests/gen/top.meta/upgrade/worker-module.https.html
@@ -0,0 +1,53 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec upgrade-insecure-requests/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "allowed",
+ "origin": "same-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "worker-module",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for worker-module to same-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "worker-module",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for worker-module to same-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-https",
+ "redirection": "downgrade",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "worker-module",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for worker-module to same-https origin and downgrade redirection from https context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/upgrade-insecure-requests/gen/top.meta/upgrade/worklet-animation-import-data.https.html b/testing/web-platform/tests/upgrade-insecure-requests/gen/top.meta/upgrade/worklet-animation-import-data.https.html
new file mode 100644
index 0000000000..99b161ff5e
--- /dev/null
+++ b/testing/web-platform/tests/upgrade-insecure-requests/gen/top.meta/upgrade/worklet-animation-import-data.https.html
@@ -0,0 +1,83 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec upgrade-insecure-requests/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "allowed",
+ "origin": "cross-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "worklet-animation-import-data",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for worklet-animation-import-data to cross-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "cross-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "worklet-animation-import-data",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for worklet-animation-import-data to cross-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "cross-https",
+ "redirection": "downgrade",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "worklet-animation-import-data",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for worklet-animation-import-data to cross-https origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "worklet-animation-import-data",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for worklet-animation-import-data to same-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "worklet-animation-import-data",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for worklet-animation-import-data to same-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-https",
+ "redirection": "downgrade",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "worklet-animation-import-data",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for worklet-animation-import-data to same-https origin and downgrade redirection from https context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/upgrade-insecure-requests/gen/top.meta/upgrade/worklet-animation.https.html b/testing/web-platform/tests/upgrade-insecure-requests/gen/top.meta/upgrade/worklet-animation.https.html
new file mode 100644
index 0000000000..ddded11818
--- /dev/null
+++ b/testing/web-platform/tests/upgrade-insecure-requests/gen/top.meta/upgrade/worklet-animation.https.html
@@ -0,0 +1,83 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec upgrade-insecure-requests/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "allowed",
+ "origin": "cross-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "worklet-animation",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for worklet-animation to cross-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "cross-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "worklet-animation",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for worklet-animation to cross-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "cross-https",
+ "redirection": "downgrade",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "worklet-animation",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for worklet-animation to cross-https origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "worklet-animation",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for worklet-animation to same-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "worklet-animation",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for worklet-animation to same-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-https",
+ "redirection": "downgrade",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "worklet-animation",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for worklet-animation to same-https origin and downgrade redirection from https context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/upgrade-insecure-requests/gen/top.meta/upgrade/worklet-audio-import-data.https.html b/testing/web-platform/tests/upgrade-insecure-requests/gen/top.meta/upgrade/worklet-audio-import-data.https.html
new file mode 100644
index 0000000000..99e634cfae
--- /dev/null
+++ b/testing/web-platform/tests/upgrade-insecure-requests/gen/top.meta/upgrade/worklet-audio-import-data.https.html
@@ -0,0 +1,83 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec upgrade-insecure-requests/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "allowed",
+ "origin": "cross-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "worklet-audio-import-data",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for worklet-audio-import-data to cross-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "cross-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "worklet-audio-import-data",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for worklet-audio-import-data to cross-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "cross-https",
+ "redirection": "downgrade",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "worklet-audio-import-data",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for worklet-audio-import-data to cross-https origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "worklet-audio-import-data",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for worklet-audio-import-data to same-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "worklet-audio-import-data",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for worklet-audio-import-data to same-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-https",
+ "redirection": "downgrade",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "worklet-audio-import-data",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for worklet-audio-import-data to same-https origin and downgrade redirection from https context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/upgrade-insecure-requests/gen/top.meta/upgrade/worklet-audio.https.html b/testing/web-platform/tests/upgrade-insecure-requests/gen/top.meta/upgrade/worklet-audio.https.html
new file mode 100644
index 0000000000..e49a11154c
--- /dev/null
+++ b/testing/web-platform/tests/upgrade-insecure-requests/gen/top.meta/upgrade/worklet-audio.https.html
@@ -0,0 +1,83 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec upgrade-insecure-requests/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "allowed",
+ "origin": "cross-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "worklet-audio",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for worklet-audio to cross-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "cross-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "worklet-audio",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for worklet-audio to cross-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "cross-https",
+ "redirection": "downgrade",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "worklet-audio",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for worklet-audio to cross-https origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "worklet-audio",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for worklet-audio to same-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "worklet-audio",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for worklet-audio to same-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-https",
+ "redirection": "downgrade",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "worklet-audio",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for worklet-audio to same-https origin and downgrade redirection from https context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/upgrade-insecure-requests/gen/top.meta/upgrade/worklet-layout-import-data.https.html b/testing/web-platform/tests/upgrade-insecure-requests/gen/top.meta/upgrade/worklet-layout-import-data.https.html
new file mode 100644
index 0000000000..c0b3b47918
--- /dev/null
+++ b/testing/web-platform/tests/upgrade-insecure-requests/gen/top.meta/upgrade/worklet-layout-import-data.https.html
@@ -0,0 +1,83 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec upgrade-insecure-requests/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "allowed",
+ "origin": "cross-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "worklet-layout-import-data",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for worklet-layout-import-data to cross-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "cross-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "worklet-layout-import-data",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for worklet-layout-import-data to cross-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "cross-https",
+ "redirection": "downgrade",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "worklet-layout-import-data",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for worklet-layout-import-data to cross-https origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "worklet-layout-import-data",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for worklet-layout-import-data to same-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "worklet-layout-import-data",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for worklet-layout-import-data to same-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-https",
+ "redirection": "downgrade",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "worklet-layout-import-data",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for worklet-layout-import-data to same-https origin and downgrade redirection from https context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/upgrade-insecure-requests/gen/top.meta/upgrade/worklet-layout.https.html b/testing/web-platform/tests/upgrade-insecure-requests/gen/top.meta/upgrade/worklet-layout.https.html
new file mode 100644
index 0000000000..917e5f064a
--- /dev/null
+++ b/testing/web-platform/tests/upgrade-insecure-requests/gen/top.meta/upgrade/worklet-layout.https.html
@@ -0,0 +1,83 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec upgrade-insecure-requests/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "allowed",
+ "origin": "cross-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "worklet-layout",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for worklet-layout to cross-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "cross-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "worklet-layout",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for worklet-layout to cross-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "cross-https",
+ "redirection": "downgrade",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "worklet-layout",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for worklet-layout to cross-https origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "worklet-layout",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for worklet-layout to same-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "worklet-layout",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for worklet-layout to same-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-https",
+ "redirection": "downgrade",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "worklet-layout",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for worklet-layout to same-https origin and downgrade redirection from https context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/upgrade-insecure-requests/gen/top.meta/upgrade/worklet-paint-import-data.https.html b/testing/web-platform/tests/upgrade-insecure-requests/gen/top.meta/upgrade/worklet-paint-import-data.https.html
new file mode 100644
index 0000000000..847e38a536
--- /dev/null
+++ b/testing/web-platform/tests/upgrade-insecure-requests/gen/top.meta/upgrade/worklet-paint-import-data.https.html
@@ -0,0 +1,83 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec upgrade-insecure-requests/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "allowed",
+ "origin": "cross-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "worklet-paint-import-data",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for worklet-paint-import-data to cross-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "cross-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "worklet-paint-import-data",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for worklet-paint-import-data to cross-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "cross-https",
+ "redirection": "downgrade",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "worklet-paint-import-data",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for worklet-paint-import-data to cross-https origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "worklet-paint-import-data",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for worklet-paint-import-data to same-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "worklet-paint-import-data",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for worklet-paint-import-data to same-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-https",
+ "redirection": "downgrade",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "worklet-paint-import-data",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for worklet-paint-import-data to same-https origin and downgrade redirection from https context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/upgrade-insecure-requests/gen/top.meta/upgrade/worklet-paint.https.html b/testing/web-platform/tests/upgrade-insecure-requests/gen/top.meta/upgrade/worklet-paint.https.html
new file mode 100644
index 0000000000..09a5ac2eb7
--- /dev/null
+++ b/testing/web-platform/tests/upgrade-insecure-requests/gen/top.meta/upgrade/worklet-paint.https.html
@@ -0,0 +1,83 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec upgrade-insecure-requests/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "allowed",
+ "origin": "cross-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "worklet-paint",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for worklet-paint to cross-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "cross-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "worklet-paint",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for worklet-paint to cross-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "cross-https",
+ "redirection": "downgrade",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "worklet-paint",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for worklet-paint to cross-https origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "worklet-paint",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for worklet-paint to same-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "worklet-paint",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for worklet-paint to same-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-https",
+ "redirection": "downgrade",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "worklet-paint",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for worklet-paint to same-https origin and downgrade redirection from https context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/upgrade-insecure-requests/gen/top.meta/upgrade/xhr.https.html b/testing/web-platform/tests/upgrade-insecure-requests/gen/top.meta/upgrade/xhr.https.html
new file mode 100644
index 0000000000..4d16491a4d
--- /dev/null
+++ b/testing/web-platform/tests/upgrade-insecure-requests/gen/top.meta/upgrade/xhr.https.html
@@ -0,0 +1,83 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec upgrade-insecure-requests/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "allowed",
+ "origin": "cross-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for xhr to cross-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "cross-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for xhr to cross-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "cross-https",
+ "redirection": "downgrade",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for xhr to cross-https origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for xhr to same-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for xhr to same-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-https",
+ "redirection": "downgrade",
+ "source_context_list": [],
+ "source_scheme": "https",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for xhr to same-https origin and downgrade redirection from https context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/upgrade-insecure-requests/gen/worker-classic-data.meta/unset/fetch.https.html b/testing/web-platform/tests/upgrade-insecure-requests/gen/worker-classic-data.meta/unset/fetch.https.html
new file mode 100644
index 0000000000..607c6828e4
--- /dev/null
+++ b/testing/web-platform/tests/upgrade-insecure-requests/gen/worker-classic-data.meta/unset/fetch.https.html
@@ -0,0 +1,112 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec upgrade-insecure-requests/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "blocked",
+ "origin": "cross-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "worker-classic-data"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for fetch to cross-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "cross-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "worker-classic-data"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for fetch to cross-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "cross-https",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "worker-classic-data"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for fetch to cross-https origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "same-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "worker-classic-data"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for fetch to same-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "same-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "worker-classic-data"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for fetch to same-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "same-https",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "worker-classic-data"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for fetch to same-https origin and downgrade redirection from https context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/upgrade-insecure-requests/gen/worker-classic-data.meta/unset/websocket.https.html b/testing/web-platform/tests/upgrade-insecure-requests/gen/worker-classic-data.meta/unset/websocket.https.html
new file mode 100644
index 0000000000..2b140fabc9
--- /dev/null
+++ b/testing/web-platform/tests/upgrade-insecure-requests/gen/worker-classic-data.meta/unset/websocket.https.html
@@ -0,0 +1,52 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec upgrade-insecure-requests/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "blocked",
+ "origin": "cross-ws-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "worker-classic-data"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "websocket",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for websocket to cross-ws-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "same-ws-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "worker-classic-data"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "websocket",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for websocket to same-ws-downgrade origin and no-redirect redirection from https context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/upgrade-insecure-requests/gen/worker-classic-data.meta/unset/xhr.https.html b/testing/web-platform/tests/upgrade-insecure-requests/gen/worker-classic-data.meta/unset/xhr.https.html
new file mode 100644
index 0000000000..044aeb1676
--- /dev/null
+++ b/testing/web-platform/tests/upgrade-insecure-requests/gen/worker-classic-data.meta/unset/xhr.https.html
@@ -0,0 +1,112 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec upgrade-insecure-requests/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "blocked",
+ "origin": "cross-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "worker-classic-data"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for xhr to cross-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "cross-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "worker-classic-data"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for xhr to cross-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "cross-https",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "worker-classic-data"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for xhr to cross-https origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "same-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "worker-classic-data"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for xhr to same-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "same-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "worker-classic-data"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for xhr to same-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "same-https",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "worker-classic-data"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for xhr to same-https origin and downgrade redirection from https context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/upgrade-insecure-requests/gen/worker-classic-data.meta/upgrade/fetch.https.html b/testing/web-platform/tests/upgrade-insecure-requests/gen/worker-classic-data.meta/upgrade/fetch.https.html
new file mode 100644
index 0000000000..a7e4b9bd7b
--- /dev/null
+++ b/testing/web-platform/tests/upgrade-insecure-requests/gen/worker-classic-data.meta/upgrade/fetch.https.html
@@ -0,0 +1,113 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec upgrade-insecure-requests/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "allowed",
+ "origin": "cross-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "worker-classic-data"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for fetch to cross-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "cross-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "worker-classic-data"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for fetch to cross-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "cross-https",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "worker-classic-data"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for fetch to cross-https origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "worker-classic-data"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for fetch to same-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "worker-classic-data"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for fetch to same-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-https",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "worker-classic-data"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for fetch to same-https origin and downgrade redirection from https context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/upgrade-insecure-requests/gen/worker-classic-data.meta/upgrade/websocket.https.html b/testing/web-platform/tests/upgrade-insecure-requests/gen/worker-classic-data.meta/upgrade/websocket.https.html
new file mode 100644
index 0000000000..d1ac903673
--- /dev/null
+++ b/testing/web-platform/tests/upgrade-insecure-requests/gen/worker-classic-data.meta/upgrade/websocket.https.html
@@ -0,0 +1,53 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec upgrade-insecure-requests/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "allowed",
+ "origin": "cross-ws-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "worker-classic-data"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "websocket",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for websocket to cross-ws-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-ws-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "worker-classic-data"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "websocket",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for websocket to same-ws-downgrade origin and no-redirect redirection from https context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/upgrade-insecure-requests/gen/worker-classic-data.meta/upgrade/xhr.https.html b/testing/web-platform/tests/upgrade-insecure-requests/gen/worker-classic-data.meta/upgrade/xhr.https.html
new file mode 100644
index 0000000000..5ecc9293b5
--- /dev/null
+++ b/testing/web-platform/tests/upgrade-insecure-requests/gen/worker-classic-data.meta/upgrade/xhr.https.html
@@ -0,0 +1,113 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec upgrade-insecure-requests/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "allowed",
+ "origin": "cross-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "worker-classic-data"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for xhr to cross-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "cross-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "worker-classic-data"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for xhr to cross-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "cross-https",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "worker-classic-data"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for xhr to cross-https origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "worker-classic-data"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for xhr to same-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "worker-classic-data"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for xhr to same-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-https",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "worker-classic-data"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for xhr to same-https origin and downgrade redirection from https context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/upgrade-insecure-requests/gen/worker-classic.http-rp/upgrade/fetch.https.html b/testing/web-platform/tests/upgrade-insecure-requests/gen/worker-classic.http-rp/upgrade/fetch.https.html
new file mode 100644
index 0000000000..0d9eb0b56a
--- /dev/null
+++ b/testing/web-platform/tests/upgrade-insecure-requests/gen/worker-classic.http-rp/upgrade/fetch.https.html
@@ -0,0 +1,148 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec upgrade-insecure-requests/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "allowed",
+ "origin": "cross-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "upgradeInsecureRequests",
+ "value": "upgrade"
+ }
+ ],
+ "sourceContextType": "worker-classic"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for fetch to cross-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "cross-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "upgradeInsecureRequests",
+ "value": "upgrade"
+ }
+ ],
+ "sourceContextType": "worker-classic"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for fetch to cross-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "cross-https",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "upgradeInsecureRequests",
+ "value": "upgrade"
+ }
+ ],
+ "sourceContextType": "worker-classic"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for fetch to cross-https origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "upgradeInsecureRequests",
+ "value": "upgrade"
+ }
+ ],
+ "sourceContextType": "worker-classic"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for fetch to same-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "upgradeInsecureRequests",
+ "value": "upgrade"
+ }
+ ],
+ "sourceContextType": "worker-classic"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for fetch to same-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-https",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "upgradeInsecureRequests",
+ "value": "upgrade"
+ }
+ ],
+ "sourceContextType": "worker-classic"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for fetch to same-https origin and downgrade redirection from https context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/upgrade-insecure-requests/gen/worker-classic.http-rp/upgrade/websocket.https.html b/testing/web-platform/tests/upgrade-insecure-requests/gen/worker-classic.http-rp/upgrade/websocket.https.html
new file mode 100644
index 0000000000..117973e408
--- /dev/null
+++ b/testing/web-platform/tests/upgrade-insecure-requests/gen/worker-classic.http-rp/upgrade/websocket.https.html
@@ -0,0 +1,64 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec upgrade-insecure-requests/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "allowed",
+ "origin": "cross-ws-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "upgradeInsecureRequests",
+ "value": "upgrade"
+ }
+ ],
+ "sourceContextType": "worker-classic"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "websocket",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for websocket to cross-ws-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-ws-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "upgradeInsecureRequests",
+ "value": "upgrade"
+ }
+ ],
+ "sourceContextType": "worker-classic"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "websocket",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for websocket to same-ws-downgrade origin and no-redirect redirection from https context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/upgrade-insecure-requests/gen/worker-classic.http-rp/upgrade/worker-classic.https.html b/testing/web-platform/tests/upgrade-insecure-requests/gen/worker-classic.http-rp/upgrade/worker-classic.https.html
new file mode 100644
index 0000000000..af144c38a6
--- /dev/null
+++ b/testing/web-platform/tests/upgrade-insecure-requests/gen/worker-classic.http-rp/upgrade/worker-classic.https.html
@@ -0,0 +1,85 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec upgrade-insecure-requests/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "allowed",
+ "origin": "same-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "upgradeInsecureRequests",
+ "value": "upgrade"
+ }
+ ],
+ "sourceContextType": "worker-classic"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "worker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for worker-classic to same-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "upgradeInsecureRequests",
+ "value": "upgrade"
+ }
+ ],
+ "sourceContextType": "worker-classic"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "worker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for worker-classic to same-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-https",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "upgradeInsecureRequests",
+ "value": "upgrade"
+ }
+ ],
+ "sourceContextType": "worker-classic"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "worker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for worker-classic to same-https origin and downgrade redirection from https context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/upgrade-insecure-requests/gen/worker-classic.http-rp/upgrade/worker-module.https.html b/testing/web-platform/tests/upgrade-insecure-requests/gen/worker-classic.http-rp/upgrade/worker-module.https.html
new file mode 100644
index 0000000000..f91b6c413a
--- /dev/null
+++ b/testing/web-platform/tests/upgrade-insecure-requests/gen/worker-classic.http-rp/upgrade/worker-module.https.html
@@ -0,0 +1,85 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec upgrade-insecure-requests/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "allowed",
+ "origin": "same-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "upgradeInsecureRequests",
+ "value": "upgrade"
+ }
+ ],
+ "sourceContextType": "worker-classic"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "worker-module",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for worker-module to same-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "upgradeInsecureRequests",
+ "value": "upgrade"
+ }
+ ],
+ "sourceContextType": "worker-classic"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "worker-module",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for worker-module to same-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-https",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "upgradeInsecureRequests",
+ "value": "upgrade"
+ }
+ ],
+ "sourceContextType": "worker-classic"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "worker-module",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for worker-module to same-https origin and downgrade redirection from https context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/upgrade-insecure-requests/gen/worker-classic.http-rp/upgrade/xhr.https.html b/testing/web-platform/tests/upgrade-insecure-requests/gen/worker-classic.http-rp/upgrade/xhr.https.html
new file mode 100644
index 0000000000..edca66b943
--- /dev/null
+++ b/testing/web-platform/tests/upgrade-insecure-requests/gen/worker-classic.http-rp/upgrade/xhr.https.html
@@ -0,0 +1,148 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec upgrade-insecure-requests/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "allowed",
+ "origin": "cross-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "upgradeInsecureRequests",
+ "value": "upgrade"
+ }
+ ],
+ "sourceContextType": "worker-classic"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for xhr to cross-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "cross-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "upgradeInsecureRequests",
+ "value": "upgrade"
+ }
+ ],
+ "sourceContextType": "worker-classic"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for xhr to cross-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "cross-https",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "upgradeInsecureRequests",
+ "value": "upgrade"
+ }
+ ],
+ "sourceContextType": "worker-classic"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for xhr to cross-https origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "upgradeInsecureRequests",
+ "value": "upgrade"
+ }
+ ],
+ "sourceContextType": "worker-classic"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for xhr to same-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "upgradeInsecureRequests",
+ "value": "upgrade"
+ }
+ ],
+ "sourceContextType": "worker-classic"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for xhr to same-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-https",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "upgradeInsecureRequests",
+ "value": "upgrade"
+ }
+ ],
+ "sourceContextType": "worker-classic"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for xhr to same-https origin and downgrade redirection from https context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/upgrade-insecure-requests/gen/worker-module-data.http-rp/upgrade/fetch.https.html b/testing/web-platform/tests/upgrade-insecure-requests/gen/worker-module-data.http-rp/upgrade/fetch.https.html
new file mode 100644
index 0000000000..9ff76bc787
--- /dev/null
+++ b/testing/web-platform/tests/upgrade-insecure-requests/gen/worker-module-data.http-rp/upgrade/fetch.https.html
@@ -0,0 +1,112 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec upgrade-insecure-requests/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "allowed",
+ "origin": "cross-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "worker-module-data"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for fetch to cross-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "cross-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "worker-module-data"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for fetch to cross-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "cross-https",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "worker-module-data"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for fetch to cross-https origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "worker-module-data"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for fetch to same-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "worker-module-data"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for fetch to same-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-https",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "worker-module-data"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for fetch to same-https origin and downgrade redirection from https context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/upgrade-insecure-requests/gen/worker-module-data.http-rp/upgrade/fetch.https.html.headers b/testing/web-platform/tests/upgrade-insecure-requests/gen/worker-module-data.http-rp/upgrade/fetch.https.html.headers
new file mode 100644
index 0000000000..602d9dc38d
--- /dev/null
+++ b/testing/web-platform/tests/upgrade-insecure-requests/gen/worker-module-data.http-rp/upgrade/fetch.https.html.headers
@@ -0,0 +1 @@
+Content-Security-Policy: upgrade-insecure-requests
diff --git a/testing/web-platform/tests/upgrade-insecure-requests/gen/worker-module-data.http-rp/upgrade/websocket.https.html b/testing/web-platform/tests/upgrade-insecure-requests/gen/worker-module-data.http-rp/upgrade/websocket.https.html
new file mode 100644
index 0000000000..2d8c1bef7e
--- /dev/null
+++ b/testing/web-platform/tests/upgrade-insecure-requests/gen/worker-module-data.http-rp/upgrade/websocket.https.html
@@ -0,0 +1,52 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec upgrade-insecure-requests/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "allowed",
+ "origin": "cross-ws-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "worker-module-data"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "websocket",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for websocket to cross-ws-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-ws-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "worker-module-data"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "websocket",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for websocket to same-ws-downgrade origin and no-redirect redirection from https context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/upgrade-insecure-requests/gen/worker-module-data.http-rp/upgrade/websocket.https.html.headers b/testing/web-platform/tests/upgrade-insecure-requests/gen/worker-module-data.http-rp/upgrade/websocket.https.html.headers
new file mode 100644
index 0000000000..602d9dc38d
--- /dev/null
+++ b/testing/web-platform/tests/upgrade-insecure-requests/gen/worker-module-data.http-rp/upgrade/websocket.https.html.headers
@@ -0,0 +1 @@
+Content-Security-Policy: upgrade-insecure-requests
diff --git a/testing/web-platform/tests/upgrade-insecure-requests/gen/worker-module-data.http-rp/upgrade/xhr.https.html b/testing/web-platform/tests/upgrade-insecure-requests/gen/worker-module-data.http-rp/upgrade/xhr.https.html
new file mode 100644
index 0000000000..b406ddd6da
--- /dev/null
+++ b/testing/web-platform/tests/upgrade-insecure-requests/gen/worker-module-data.http-rp/upgrade/xhr.https.html
@@ -0,0 +1,112 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec upgrade-insecure-requests/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "allowed",
+ "origin": "cross-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "worker-module-data"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for xhr to cross-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "cross-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "worker-module-data"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for xhr to cross-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "cross-https",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "worker-module-data"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for xhr to cross-https origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "worker-module-data"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for xhr to same-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "worker-module-data"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for xhr to same-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-https",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "worker-module-data"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for xhr to same-https origin and downgrade redirection from https context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/upgrade-insecure-requests/gen/worker-module-data.http-rp/upgrade/xhr.https.html.headers b/testing/web-platform/tests/upgrade-insecure-requests/gen/worker-module-data.http-rp/upgrade/xhr.https.html.headers
new file mode 100644
index 0000000000..602d9dc38d
--- /dev/null
+++ b/testing/web-platform/tests/upgrade-insecure-requests/gen/worker-module-data.http-rp/upgrade/xhr.https.html.headers
@@ -0,0 +1 @@
+Content-Security-Policy: upgrade-insecure-requests
diff --git a/testing/web-platform/tests/upgrade-insecure-requests/gen/worker-module-data.meta/unset/fetch.https.html b/testing/web-platform/tests/upgrade-insecure-requests/gen/worker-module-data.meta/unset/fetch.https.html
new file mode 100644
index 0000000000..4a65c521df
--- /dev/null
+++ b/testing/web-platform/tests/upgrade-insecure-requests/gen/worker-module-data.meta/unset/fetch.https.html
@@ -0,0 +1,112 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec upgrade-insecure-requests/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "blocked",
+ "origin": "cross-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "worker-module-data"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for fetch to cross-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "cross-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "worker-module-data"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for fetch to cross-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "cross-https",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "worker-module-data"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for fetch to cross-https origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "same-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "worker-module-data"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for fetch to same-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "same-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "worker-module-data"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for fetch to same-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "same-https",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "worker-module-data"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for fetch to same-https origin and downgrade redirection from https context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/upgrade-insecure-requests/gen/worker-module-data.meta/unset/websocket.https.html b/testing/web-platform/tests/upgrade-insecure-requests/gen/worker-module-data.meta/unset/websocket.https.html
new file mode 100644
index 0000000000..27e0c78bb8
--- /dev/null
+++ b/testing/web-platform/tests/upgrade-insecure-requests/gen/worker-module-data.meta/unset/websocket.https.html
@@ -0,0 +1,52 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec upgrade-insecure-requests/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "blocked",
+ "origin": "cross-ws-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "worker-module-data"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "websocket",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for websocket to cross-ws-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "same-ws-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "worker-module-data"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "websocket",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for websocket to same-ws-downgrade origin and no-redirect redirection from https context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/upgrade-insecure-requests/gen/worker-module-data.meta/unset/xhr.https.html b/testing/web-platform/tests/upgrade-insecure-requests/gen/worker-module-data.meta/unset/xhr.https.html
new file mode 100644
index 0000000000..eaad29b7d4
--- /dev/null
+++ b/testing/web-platform/tests/upgrade-insecure-requests/gen/worker-module-data.meta/unset/xhr.https.html
@@ -0,0 +1,112 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec upgrade-insecure-requests/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "blocked",
+ "origin": "cross-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "worker-module-data"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for xhr to cross-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "cross-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "worker-module-data"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for xhr to cross-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "cross-https",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "worker-module-data"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for xhr to cross-https origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "same-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "worker-module-data"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for xhr to same-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "same-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "worker-module-data"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for xhr to same-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "blocked",
+ "origin": "same-https",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "worker-module-data"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects blocked for xhr to same-https origin and downgrade redirection from https context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/upgrade-insecure-requests/gen/worker-module-data.meta/upgrade/fetch.https.html b/testing/web-platform/tests/upgrade-insecure-requests/gen/worker-module-data.meta/upgrade/fetch.https.html
new file mode 100644
index 0000000000..c069239673
--- /dev/null
+++ b/testing/web-platform/tests/upgrade-insecure-requests/gen/worker-module-data.meta/upgrade/fetch.https.html
@@ -0,0 +1,113 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec upgrade-insecure-requests/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "allowed",
+ "origin": "cross-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "worker-module-data"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for fetch to cross-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "cross-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "worker-module-data"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for fetch to cross-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "cross-https",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "worker-module-data"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for fetch to cross-https origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "worker-module-data"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for fetch to same-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "worker-module-data"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for fetch to same-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-https",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "worker-module-data"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for fetch to same-https origin and downgrade redirection from https context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/upgrade-insecure-requests/gen/worker-module-data.meta/upgrade/websocket.https.html b/testing/web-platform/tests/upgrade-insecure-requests/gen/worker-module-data.meta/upgrade/websocket.https.html
new file mode 100644
index 0000000000..0173f7986b
--- /dev/null
+++ b/testing/web-platform/tests/upgrade-insecure-requests/gen/worker-module-data.meta/upgrade/websocket.https.html
@@ -0,0 +1,53 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec upgrade-insecure-requests/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "allowed",
+ "origin": "cross-ws-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "worker-module-data"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "websocket",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for websocket to cross-ws-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-ws-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "worker-module-data"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "websocket",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for websocket to same-ws-downgrade origin and no-redirect redirection from https context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/upgrade-insecure-requests/gen/worker-module-data.meta/upgrade/xhr.https.html b/testing/web-platform/tests/upgrade-insecure-requests/gen/worker-module-data.meta/upgrade/xhr.https.html
new file mode 100644
index 0000000000..5cce5cce98
--- /dev/null
+++ b/testing/web-platform/tests/upgrade-insecure-requests/gen/worker-module-data.meta/upgrade/xhr.https.html
@@ -0,0 +1,113 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec upgrade-insecure-requests/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "allowed",
+ "origin": "cross-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "worker-module-data"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for xhr to cross-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "cross-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "worker-module-data"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for xhr to cross-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "cross-https",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "worker-module-data"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for xhr to cross-https origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "worker-module-data"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for xhr to same-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "worker-module-data"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for xhr to same-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-https",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [],
+ "sourceContextType": "worker-module-data"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for xhr to same-https origin and downgrade redirection from https context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/upgrade-insecure-requests/gen/worker-module.http-rp/upgrade/fetch.https.html b/testing/web-platform/tests/upgrade-insecure-requests/gen/worker-module.http-rp/upgrade/fetch.https.html
new file mode 100644
index 0000000000..d904dccf26
--- /dev/null
+++ b/testing/web-platform/tests/upgrade-insecure-requests/gen/worker-module.http-rp/upgrade/fetch.https.html
@@ -0,0 +1,148 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec upgrade-insecure-requests/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "allowed",
+ "origin": "cross-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "upgradeInsecureRequests",
+ "value": "upgrade"
+ }
+ ],
+ "sourceContextType": "worker-module"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for fetch to cross-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "cross-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "upgradeInsecureRequests",
+ "value": "upgrade"
+ }
+ ],
+ "sourceContextType": "worker-module"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for fetch to cross-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "cross-https",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "upgradeInsecureRequests",
+ "value": "upgrade"
+ }
+ ],
+ "sourceContextType": "worker-module"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for fetch to cross-https origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "upgradeInsecureRequests",
+ "value": "upgrade"
+ }
+ ],
+ "sourceContextType": "worker-module"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for fetch to same-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "upgradeInsecureRequests",
+ "value": "upgrade"
+ }
+ ],
+ "sourceContextType": "worker-module"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for fetch to same-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-https",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "upgradeInsecureRequests",
+ "value": "upgrade"
+ }
+ ],
+ "sourceContextType": "worker-module"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for fetch to same-https origin and downgrade redirection from https context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/upgrade-insecure-requests/gen/worker-module.http-rp/upgrade/websocket.https.html b/testing/web-platform/tests/upgrade-insecure-requests/gen/worker-module.http-rp/upgrade/websocket.https.html
new file mode 100644
index 0000000000..62fb899cd0
--- /dev/null
+++ b/testing/web-platform/tests/upgrade-insecure-requests/gen/worker-module.http-rp/upgrade/websocket.https.html
@@ -0,0 +1,64 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec upgrade-insecure-requests/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "allowed",
+ "origin": "cross-ws-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "upgradeInsecureRequests",
+ "value": "upgrade"
+ }
+ ],
+ "sourceContextType": "worker-module"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "websocket",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for websocket to cross-ws-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-ws-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "upgradeInsecureRequests",
+ "value": "upgrade"
+ }
+ ],
+ "sourceContextType": "worker-module"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "websocket",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for websocket to same-ws-downgrade origin and no-redirect redirection from https context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/upgrade-insecure-requests/gen/worker-module.http-rp/upgrade/worker-classic.https.html b/testing/web-platform/tests/upgrade-insecure-requests/gen/worker-module.http-rp/upgrade/worker-classic.https.html
new file mode 100644
index 0000000000..edd3a00c57
--- /dev/null
+++ b/testing/web-platform/tests/upgrade-insecure-requests/gen/worker-module.http-rp/upgrade/worker-classic.https.html
@@ -0,0 +1,85 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec upgrade-insecure-requests/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "allowed",
+ "origin": "same-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "upgradeInsecureRequests",
+ "value": "upgrade"
+ }
+ ],
+ "sourceContextType": "worker-module"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "worker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for worker-classic to same-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "upgradeInsecureRequests",
+ "value": "upgrade"
+ }
+ ],
+ "sourceContextType": "worker-module"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "worker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for worker-classic to same-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-https",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "upgradeInsecureRequests",
+ "value": "upgrade"
+ }
+ ],
+ "sourceContextType": "worker-module"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "worker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for worker-classic to same-https origin and downgrade redirection from https context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/upgrade-insecure-requests/gen/worker-module.http-rp/upgrade/worker-module.https.html b/testing/web-platform/tests/upgrade-insecure-requests/gen/worker-module.http-rp/upgrade/worker-module.https.html
new file mode 100644
index 0000000000..c1f8057c9e
--- /dev/null
+++ b/testing/web-platform/tests/upgrade-insecure-requests/gen/worker-module.http-rp/upgrade/worker-module.https.html
@@ -0,0 +1,85 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec upgrade-insecure-requests/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "allowed",
+ "origin": "same-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "upgradeInsecureRequests",
+ "value": "upgrade"
+ }
+ ],
+ "sourceContextType": "worker-module"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "worker-module",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for worker-module to same-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "upgradeInsecureRequests",
+ "value": "upgrade"
+ }
+ ],
+ "sourceContextType": "worker-module"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "worker-module",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for worker-module to same-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-https",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "upgradeInsecureRequests",
+ "value": "upgrade"
+ }
+ ],
+ "sourceContextType": "worker-module"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "worker-module",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for worker-module to same-https origin and downgrade redirection from https context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/upgrade-insecure-requests/gen/worker-module.http-rp/upgrade/xhr.https.html b/testing/web-platform/tests/upgrade-insecure-requests/gen/worker-module.http-rp/upgrade/xhr.https.html
new file mode 100644
index 0000000000..eca7811d0b
--- /dev/null
+++ b/testing/web-platform/tests/upgrade-insecure-requests/gen/worker-module.http-rp/upgrade/xhr.https.html
@@ -0,0 +1,148 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec upgrade-insecure-requests/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "allowed",
+ "origin": "cross-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "upgradeInsecureRequests",
+ "value": "upgrade"
+ }
+ ],
+ "sourceContextType": "worker-module"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for xhr to cross-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "cross-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "upgradeInsecureRequests",
+ "value": "upgrade"
+ }
+ ],
+ "sourceContextType": "worker-module"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for xhr to cross-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "cross-https",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "upgradeInsecureRequests",
+ "value": "upgrade"
+ }
+ ],
+ "sourceContextType": "worker-module"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for xhr to cross-https origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-http-downgrade",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "upgradeInsecureRequests",
+ "value": "upgrade"
+ }
+ ],
+ "sourceContextType": "worker-module"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for xhr to same-http-downgrade origin and downgrade redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-http-downgrade",
+ "redirection": "no-redirect",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "upgradeInsecureRequests",
+ "value": "upgrade"
+ }
+ ],
+ "sourceContextType": "worker-module"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for xhr to same-http-downgrade origin and no-redirect redirection from https context."
+ },
+ {
+ "expectation": "allowed",
+ "origin": "same-https",
+ "redirection": "downgrade",
+ "source_context_list": [
+ {
+ "policyDeliveries": [
+ {
+ "deliveryType": "http-rp",
+ "key": "upgradeInsecureRequests",
+ "value": "upgrade"
+ }
+ ],
+ "sourceContextType": "worker-module"
+ }
+ ],
+ "source_scheme": "https",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Upgrade-Insecure-Requests: Expects allowed for xhr to same-https origin and downgrade redirection from https context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/upgrade-insecure-requests/generic/test-case.sub.js b/testing/web-platform/tests/upgrade-insecure-requests/generic/test-case.sub.js
new file mode 100644
index 0000000000..6652f85d4a
--- /dev/null
+++ b/testing/web-platform/tests/upgrade-insecure-requests/generic/test-case.sub.js
@@ -0,0 +1,43 @@
+// TODO(hiroshige): Document the type of `scenario`.
+function TestCase(scenarios) {
+ function runTest(scenario) {
+ const urls = getRequestURLs(scenario.subresource,
+ scenario.origin,
+ scenario.redirection);
+ const checkResult = _ => {
+ // Send request to check if the key has been torn down.
+ return xhrRequest(urls.assertUrl)
+ .then(assertResult => {
+ // Now check if the value has been torn down. If it's still there,
+ // we have blocked the request to mixed-content.
+ assert_equals(assertResult.status, scenario.expectation,
+ "The resource request should be '" + scenario.expectation + "'.");
+ });
+ };
+
+ /** @type {Subresource} */
+ const subresource = {
+ subresourceType: scenario.subresource,
+ url: urls.testUrl,
+ policyDeliveries: scenario.subresource_policy_deliveries,
+ };
+
+ promise_test(() => {
+ return xhrRequest(urls.announceUrl)
+ // Send out the real resource request.
+ // This should tear down the key if it's not blocked.
+ .then(_ => invokeRequest(subresource, scenario.source_context_list))
+ // We check the key state, regardless of whether the main request
+ // succeeded or failed.
+ .then(checkResult, checkResult);
+ }, scenario.test_description);
+ } // runTest
+
+ function runTests() {
+ for (const scenario of scenarios) {
+ runTest(scenario);
+ }
+ }
+
+ return {start: runTests};
+}
diff --git a/testing/web-platform/tests/upgrade-insecure-requests/link-upgrade.sub.https.html b/testing/web-platform/tests/upgrade-insecure-requests/link-upgrade.sub.https.html
new file mode 100644
index 0000000000..46788e8883
--- /dev/null
+++ b/testing/web-platform/tests/upgrade-insecure-requests/link-upgrade.sub.https.html
@@ -0,0 +1,65 @@
+<!DOCTYPE html>
+<html>
+
+ <head>
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ </head>
+
+ <body>
+ <script>
+ const test_data = [
+ {
+ url : './link-upgrade/basic-link-no-upgrade.sub.html',
+ done_message : 'basic-link-no-upgrade',
+ },
+ {
+ url : './link-upgrade/basic-link-upgrade.sub.html',
+ done_message : 'basic-link-upgrade',
+ },
+ {
+ url : './link-upgrade/iframe-link-upgrade.sub.html',
+ done_message : 'iframe-link-upgrade',
+ },
+ {
+ url : './link-upgrade/iframe-top-navigation-no-upgrade-1.sub.html',
+ done_message : 'iframe-top-navigation-no-upgrade-1',
+ },
+ {
+ url : './link-upgrade/iframe-top-navigation-no-upgrade-2.sub.html',
+ done_message : 'iframe-top-navigation-no-upgrade-2',
+ },
+ {
+ url : './link-upgrade/iframe-top-navigation-upgrade-1.sub.html',
+ done_message : 'iframe-top-navigation-upgrade-1',
+ },
+ {
+ url : './link-upgrade/iframe-top-navigation-upgrade-2.sub.html',
+ done_message : 'iframe-top-navigation-upgrade-2',
+ },
+ {
+ url : './link-upgrade/iframe-top-navigation-upgrade-meta.sub.html',
+ done_message : 'iframe-top-navigation-upgrade-meta',
+ },
+ ];
+ for(let i = 0; i<test_data.length; i+=1) {
+ let data = test_data[i];
+ let test = async_test(data.url);
+ test.step(function() {
+ let w = window.open(data.url, data.url);
+ this.add_cleanup(() => w.close());
+ assert_true(w != undefined, "Popup must not be blocked");
+
+ window.addEventListener("message", event => {
+ if (event.data == data.done_message)
+ test.done();
+ });
+ });
+
+ test.step_timeout(function(){test.force_timeout()}, 10000);
+ }
+ </script>
+ </body>
+
+</html>
diff --git a/testing/web-platform/tests/upgrade-insecure-requests/link-upgrade/basic-link-no-upgrade.sub.html b/testing/web-platform/tests/upgrade-insecure-requests/link-upgrade/basic-link-no-upgrade.sub.html
new file mode 100644
index 0000000000..c1a600f525
--- /dev/null
+++ b/testing/web-platform/tests/upgrade-insecure-requests/link-upgrade/basic-link-no-upgrade.sub.html
@@ -0,0 +1,19 @@
+<html>
+ <title>Upgrade Insecure Requests: link no upgrade.</title>
+ <head>
+ <script>
+ function click() {
+ document.getElementById("link").click();
+ }
+ </script>
+ </head>
+ <body onload="click()">
+ <!--
+ This is a bit of a hack. UPGRADE doesn't upgrade the port number. So if
+ the url is upgraded, the url becomes invalid (https over the http port).
+ The expected behavior is that the url is not upgraded and the page loads.
+ -->
+ <a id="link"
+ href="http://{{domains[www]}}:{{ports[http][0]}}/upgrade-insecure-requests/link-upgrade/resources/post-message-to-opener.sub.html?message=basic-link-no-upgrade"> Click me </a>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/upgrade-insecure-requests/link-upgrade/basic-link-no-upgrade.sub.html.headers b/testing/web-platform/tests/upgrade-insecure-requests/link-upgrade/basic-link-no-upgrade.sub.html.headers
new file mode 100644
index 0000000000..602d9dc38d
--- /dev/null
+++ b/testing/web-platform/tests/upgrade-insecure-requests/link-upgrade/basic-link-no-upgrade.sub.html.headers
@@ -0,0 +1 @@
+Content-Security-Policy: upgrade-insecure-requests
diff --git a/testing/web-platform/tests/upgrade-insecure-requests/link-upgrade/basic-link-upgrade.sub.html b/testing/web-platform/tests/upgrade-insecure-requests/link-upgrade/basic-link-upgrade.sub.html
new file mode 100644
index 0000000000..ef41d3e9c7
--- /dev/null
+++ b/testing/web-platform/tests/upgrade-insecure-requests/link-upgrade/basic-link-upgrade.sub.html
@@ -0,0 +1,19 @@
+<html>
+ <title>Upgrade Insecure Requests: link upgrade.</title>
+ <head>
+ <script>
+ function click() {
+ document.getElementById("link").click();
+ }
+ </script>
+ </head>
+ <body onload="click()">
+ <!--
+ This is a bit of a hack. UPGRADE doesn't upgrade the port number, so we
+ specify this non-existent URL ('http' over https port). If UPGRADE doesn't
+ work, it won't load. The expected behavior is that the url is upgraded and
+ the page loads.
+ -->
+ <a id="link" href="http://{{host}}:{{ports[https][0]}}/upgrade-insecure-requests/link-upgrade/resources/post-message-to-opener.sub.html?message=basic-link-upgrade"> Click me </a>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/upgrade-insecure-requests/link-upgrade/basic-link-upgrade.sub.html.headers b/testing/web-platform/tests/upgrade-insecure-requests/link-upgrade/basic-link-upgrade.sub.html.headers
new file mode 100644
index 0000000000..602d9dc38d
--- /dev/null
+++ b/testing/web-platform/tests/upgrade-insecure-requests/link-upgrade/basic-link-upgrade.sub.html.headers
@@ -0,0 +1 @@
+Content-Security-Policy: upgrade-insecure-requests
diff --git a/testing/web-platform/tests/upgrade-insecure-requests/link-upgrade/iframe-link-upgrade.sub.html b/testing/web-platform/tests/upgrade-insecure-requests/link-upgrade/iframe-link-upgrade.sub.html
new file mode 100644
index 0000000000..ed058b6154
--- /dev/null
+++ b/testing/web-platform/tests/upgrade-insecure-requests/link-upgrade/iframe-link-upgrade.sub.html
@@ -0,0 +1,11 @@
+<!--
+ This document has set "Content-Security-Policy: upgrade-insecure-requests". It
+ contains an iframe. This iframe clicks on a link to the same host. The link
+ must be upgraded.
+
+ This is a bit of a hack. UPGRADE doesn't upgrade the port number. So if
+ the url is not upgraded, the url is invalid (http over the https port).
+ The expected behavior is that the url is upgraded and the page loads.
+-->
+<iframe src= "./resources/click-on-link.sub.html?url=http://{{host}}:{{ports[https][0]}}/upgrade-insecure-requests/link-upgrade/resources/post-message-to-opener.sub.html%3Fmessage=iframe-link-upgrade">
+</iframe>
diff --git a/testing/web-platform/tests/upgrade-insecure-requests/link-upgrade/iframe-link-upgrade.sub.html.headers b/testing/web-platform/tests/upgrade-insecure-requests/link-upgrade/iframe-link-upgrade.sub.html.headers
new file mode 100644
index 0000000000..602d9dc38d
--- /dev/null
+++ b/testing/web-platform/tests/upgrade-insecure-requests/link-upgrade/iframe-link-upgrade.sub.html.headers
@@ -0,0 +1 @@
+Content-Security-Policy: upgrade-insecure-requests
diff --git a/testing/web-platform/tests/upgrade-insecure-requests/link-upgrade/iframe-top-navigation-no-upgrade-1.sub.html b/testing/web-platform/tests/upgrade-insecure-requests/link-upgrade/iframe-top-navigation-no-upgrade-1.sub.html
new file mode 100644
index 0000000000..1b514e2da7
--- /dev/null
+++ b/testing/web-platform/tests/upgrade-insecure-requests/link-upgrade/iframe-top-navigation-no-upgrade-1.sub.html
@@ -0,0 +1,16 @@
+<html>
+ <head>
+ <title>Upgrade Insecure Requests: top-frame navigation inside iframe (no upgrade expected)</title>
+ </head>
+ <body>
+ <!--
+ This is a bit of a hack. UPGRADE doesn't upgrade the port number. So if the
+ url is upgraded, the url becomes invalid (https over the http port). The
+ expected behavior is that the url is not upgraded and the page loads.
+ -->
+ <iframe
+ sandbox="allow-scripts allow-top-navigation"
+ src="https://{{domains[www]}}:{{ports[https][0]}}/upgrade-insecure-requests/link-upgrade/resources/navigate-top-frame.sub.html?url=http://{{domains[www]}}:{{ports[http][1]}}/upgrade-insecure-requests/link-upgrade/resources/post-message-to-opener.sub.html%3Fmessage=iframe-top-navigation-no-upgrade-1"
+ ></iframe>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/upgrade-insecure-requests/link-upgrade/iframe-top-navigation-no-upgrade-1.sub.html.headers b/testing/web-platform/tests/upgrade-insecure-requests/link-upgrade/iframe-top-navigation-no-upgrade-1.sub.html.headers
new file mode 100644
index 0000000000..602d9dc38d
--- /dev/null
+++ b/testing/web-platform/tests/upgrade-insecure-requests/link-upgrade/iframe-top-navigation-no-upgrade-1.sub.html.headers
@@ -0,0 +1 @@
+Content-Security-Policy: upgrade-insecure-requests
diff --git a/testing/web-platform/tests/upgrade-insecure-requests/link-upgrade/iframe-top-navigation-no-upgrade-2.sub.html b/testing/web-platform/tests/upgrade-insecure-requests/link-upgrade/iframe-top-navigation-no-upgrade-2.sub.html
new file mode 100644
index 0000000000..386a86fdbd
--- /dev/null
+++ b/testing/web-platform/tests/upgrade-insecure-requests/link-upgrade/iframe-top-navigation-no-upgrade-2.sub.html
@@ -0,0 +1,16 @@
+<html>
+ <head>
+ <title>Upgrade Insecure Requests: top-frame navigation inside iframe (no upgrade expected)</title>
+ </head>
+ <body>
+ <!--
+ This is a bit of a hack. UPGRADE doesn't upgrade the port number. So if the
+ url is upgraded, the url becomes invalid (https over the http port). The
+ expected behavior is that the url is not upgraded and the page loads.
+ -->
+ <iframe
+ sandbox="allow-scripts allow-top-navigation"
+ src="https://{{domains[www]}}:{{ports[https][0]}}/upgrade-insecure-requests/link-upgrade/resources/navigate-top-frame-upgrade.sub.html?url=http://{{host}}:{{ports[http][0]}}/upgrade-insecure-requests/link-upgrade/resources/post-message-to-opener.sub.html%3Fmessage=iframe-top-navigation-no-upgrade-2"
+ ></iframe>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/upgrade-insecure-requests/link-upgrade/iframe-top-navigation-upgrade-1.sub.html b/testing/web-platform/tests/upgrade-insecure-requests/link-upgrade/iframe-top-navigation-upgrade-1.sub.html
new file mode 100644
index 0000000000..13c76e82c8
--- /dev/null
+++ b/testing/web-platform/tests/upgrade-insecure-requests/link-upgrade/iframe-top-navigation-upgrade-1.sub.html
@@ -0,0 +1,17 @@
+<html>
+ <head>
+ <title>Upgrade Insecure Requests: top-frame navigation inside iframe (upgrade expected)</title>
+ </head>
+ <body>
+ <!--
+ This is a bit of a hack. UPGRADE doesn't upgrade the port number, so we
+ specify this non-existent URL ('http' over https port). If UPGRADE doesn't
+ work, it won't load. The expected behavior is that the url is upgraded and
+ the page loads.
+ -->
+ <iframe
+ sandbox="allow-scripts allow-top-navigation"
+ src="https://{{domains[www]}}:{{ports[https][0]}}/upgrade-insecure-requests/link-upgrade/resources/navigate-top-frame.sub.html?url=http://{{host}}:{{ports[https][0]}}/upgrade-insecure-requests/link-upgrade/resources/post-message-to-opener.sub.html%3Fmessage=iframe-top-navigation-upgrade-1"
+ ></iframe>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/upgrade-insecure-requests/link-upgrade/iframe-top-navigation-upgrade-1.sub.html.headers b/testing/web-platform/tests/upgrade-insecure-requests/link-upgrade/iframe-top-navigation-upgrade-1.sub.html.headers
new file mode 100644
index 0000000000..602d9dc38d
--- /dev/null
+++ b/testing/web-platform/tests/upgrade-insecure-requests/link-upgrade/iframe-top-navigation-upgrade-1.sub.html.headers
@@ -0,0 +1 @@
+Content-Security-Policy: upgrade-insecure-requests
diff --git a/testing/web-platform/tests/upgrade-insecure-requests/link-upgrade/iframe-top-navigation-upgrade-2.sub.html b/testing/web-platform/tests/upgrade-insecure-requests/link-upgrade/iframe-top-navigation-upgrade-2.sub.html
new file mode 100644
index 0000000000..651d76d93b
--- /dev/null
+++ b/testing/web-platform/tests/upgrade-insecure-requests/link-upgrade/iframe-top-navigation-upgrade-2.sub.html
@@ -0,0 +1,17 @@
+<html>
+ <head>
+ <title>Upgrade Insecure Requests: top-frame navigation inside iframe (upgrade expected)</title>
+ </head>
+ <body>
+ <!--
+ This is a bit of a hack. UPGRADE doesn't upgrade the port number, so we
+ specify this non-existent URL ('http' over https port). If UPGRADE doesn't
+ work, it won't load. The expected behavior is that the url is upgraded and
+ the page loads.
+ -->
+ <iframe
+ sandbox="allow-scripts allow-top-navigation"
+ src="https://{{domains[www]}}:{{ports[https][0]}}/upgrade-insecure-requests/link-upgrade/resources/navigate-top-frame-upgrade.sub.html?url=http://{{domains[www]}}:{{ports[https][0]}}/upgrade-insecure-requests/link-upgrade/resources/post-message-to-opener.sub.html%3Fmessage=iframe-top-navigation-upgrade-2"
+ ></iframe>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/upgrade-insecure-requests/link-upgrade/iframe-top-navigation-upgrade-2.sub.html.headers b/testing/web-platform/tests/upgrade-insecure-requests/link-upgrade/iframe-top-navigation-upgrade-2.sub.html.headers
new file mode 100644
index 0000000000..602d9dc38d
--- /dev/null
+++ b/testing/web-platform/tests/upgrade-insecure-requests/link-upgrade/iframe-top-navigation-upgrade-2.sub.html.headers
@@ -0,0 +1 @@
+Content-Security-Policy: upgrade-insecure-requests
diff --git a/testing/web-platform/tests/upgrade-insecure-requests/link-upgrade/iframe-top-navigation-upgrade-meta.sub.html b/testing/web-platform/tests/upgrade-insecure-requests/link-upgrade/iframe-top-navigation-upgrade-meta.sub.html
new file mode 100644
index 0000000000..e43050eb5b
--- /dev/null
+++ b/testing/web-platform/tests/upgrade-insecure-requests/link-upgrade/iframe-top-navigation-upgrade-meta.sub.html
@@ -0,0 +1,31 @@
+<html>
+ <head>
+ <title>Upgrade Insecure Requests: top-frame navigation inside iframe (upgrade expected)</title>
+ <script>
+ function iframe_onload() {
+ var iframe = document.getElementsByTagName("iframe")[0];
+ iframe.onload = null;
+
+ // Enable upgrade-insecure-requests dynamically.
+ var meta = document.createElement('meta');
+ meta.httpEquiv = "Content-Security-Policy";
+ meta.content = "upgrade-insecure-requests";
+ document.getElementsByTagName('head')[0].appendChild(meta);
+
+ // This is a bit of a hack. UPGRADE doesn't upgrade the port number,
+ // so we specify this non-existent URL ('http' over port https port). If
+ // UPGRADE doesn't work, it won't load. The expected behavior is that
+ // the url is upgraded and the page loads.
+ iframe.src =
+ "https://{{domains[www]}}:{{ports[https][0]}}/upgrade-insecure-requests/link-upgrade/resources/navigate-top-frame.sub.html?url=http://{{host}}:{{ports[https][0]}}/upgrade-insecure-requests/link-upgrade/resources/post-message-to-opener.sub.html%3Fmessage=iframe-top-navigation-upgrade-meta"
+ }
+ </script>
+ </head>
+ <body>
+ <iframe
+ sandbox = "allow-scripts allow-top-navigation"
+ src = "./resources/dummy.html"
+ onload = "iframe_onload()"
+ ></iframe>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/upgrade-insecure-requests/link-upgrade/resources/click-on-link.sub.html b/testing/web-platform/tests/upgrade-insecure-requests/link-upgrade/resources/click-on-link.sub.html
new file mode 100644
index 0000000000..d2899c8873
--- /dev/null
+++ b/testing/web-platform/tests/upgrade-insecure-requests/link-upgrade/resources/click-on-link.sub.html
@@ -0,0 +1,10 @@
+<body>
+ coucou
+ <a href="{{GET[url]}}">Click me</a>
+</body>
+
+<script>
+ window.addEventListener("load", function() {
+ document.getElementsByTagName("a")[0].click();
+ })
+</script>
diff --git a/testing/web-platform/tests/upgrade-insecure-requests/link-upgrade/resources/dummy.html b/testing/web-platform/tests/upgrade-insecure-requests/link-upgrade/resources/dummy.html
new file mode 100644
index 0000000000..1c56b51665
--- /dev/null
+++ b/testing/web-platform/tests/upgrade-insecure-requests/link-upgrade/resources/dummy.html
@@ -0,0 +1 @@
+I am not an interesting file...
diff --git a/testing/web-platform/tests/upgrade-insecure-requests/link-upgrade/resources/navigate-top-frame-upgrade.sub.html b/testing/web-platform/tests/upgrade-insecure-requests/link-upgrade/resources/navigate-top-frame-upgrade.sub.html
new file mode 100644
index 0000000000..35332900d1
--- /dev/null
+++ b/testing/web-platform/tests/upgrade-insecure-requests/link-upgrade/resources/navigate-top-frame-upgrade.sub.html
@@ -0,0 +1,5 @@
+<script>
+ window.addEventListener("load", function() {
+ window.top.location.href = "{{GET[url]}}";
+ })
+</script>
diff --git a/testing/web-platform/tests/upgrade-insecure-requests/link-upgrade/resources/navigate-top-frame-upgrade.sub.html.headers b/testing/web-platform/tests/upgrade-insecure-requests/link-upgrade/resources/navigate-top-frame-upgrade.sub.html.headers
new file mode 100644
index 0000000000..602d9dc38d
--- /dev/null
+++ b/testing/web-platform/tests/upgrade-insecure-requests/link-upgrade/resources/navigate-top-frame-upgrade.sub.html.headers
@@ -0,0 +1 @@
+Content-Security-Policy: upgrade-insecure-requests
diff --git a/testing/web-platform/tests/upgrade-insecure-requests/link-upgrade/resources/navigate-top-frame.sub.html b/testing/web-platform/tests/upgrade-insecure-requests/link-upgrade/resources/navigate-top-frame.sub.html
new file mode 100644
index 0000000000..35332900d1
--- /dev/null
+++ b/testing/web-platform/tests/upgrade-insecure-requests/link-upgrade/resources/navigate-top-frame.sub.html
@@ -0,0 +1,5 @@
+<script>
+ window.addEventListener("load", function() {
+ window.top.location.href = "{{GET[url]}}";
+ })
+</script>
diff --git a/testing/web-platform/tests/upgrade-insecure-requests/link-upgrade/resources/post-message-to-opener.sub.html b/testing/web-platform/tests/upgrade-insecure-requests/link-upgrade/resources/post-message-to-opener.sub.html
new file mode 100644
index 0000000000..5cf2df5732
--- /dev/null
+++ b/testing/web-platform/tests/upgrade-insecure-requests/link-upgrade/resources/post-message-to-opener.sub.html
@@ -0,0 +1,3 @@
+<script>
+ top.opener.postMessage("{{GET[message]}}", "*");
+</script>
diff --git a/testing/web-platform/tests/upgrade-insecure-requests/spec.src.json b/testing/web-platform/tests/upgrade-insecure-requests/spec.src.json
new file mode 100644
index 0000000000..abe3cf0dc0
--- /dev/null
+++ b/testing/web-platform/tests/upgrade-insecure-requests/spec.src.json
@@ -0,0 +1,257 @@
+{
+ "test_description_template": "Upgrade-Insecure-Requests: Expects %(expectation)s for %(subresource)s to %(origin)s origin and %(redirection)s redirection from %(source_scheme)s context.",
+ "test_page_title_template": "Upgrade-Insecure-Requests: %(title)s",
+ "specification": [
+ {
+ // No upgrade-insecure-request
+ "title": "No upgrade-insecure-request",
+ "description": "No upgrade-insecure-request",
+ "specification_url": "https://w3c.github.io/webappsec-upgrade-insecure-requests/",
+ "test_expansion": [
+ {
+ // Without upgrade-insecure-request, all requests are blocked ...
+ "expansion": "default",
+ "source_scheme": "https",
+ "source_context_list": "*",
+ "delivery_type": "meta",
+ "delivery_value": null,
+ "redirection": "*",
+ "subresource": "*",
+ "origin": "*",
+ "expectation": "blocked"
+ },
+ {
+ // ... except for the secure requests listed here
+ "expansion": "override",
+ "source_scheme": "https",
+ "source_context_list": "*",
+ "delivery_type": "meta",
+ "delivery_value": null,
+ "redirection": "no-redirect",
+ "subresource": "*",
+ "origin": [
+ "same-https",
+ "cross-https",
+ "same-wss",
+ "cross-wss"
+ ],
+ "expectation": "allowed"
+ }
+ ]
+ },
+ {
+ // With upgrade-insecure-request
+ "title": "With upgrade-insecure-request",
+ "description": "With upgrade-insecure-request",
+ "specification_url": "https://w3c.github.io/webappsec-upgrade-insecure-requests/",
+ "test_expansion": [
+ {
+ // With upgrade-insecure-request, all insecure requests are upgraded and allowed.
+ "expansion": "default",
+ "source_scheme": "https",
+ "source_context_list": "*",
+ "delivery_type": "*",
+ "delivery_value": "upgrade",
+ "redirection": "*",
+ "subresource": "*",
+ "origin": "*",
+ "expectation": "allowed"
+ }
+ ]
+ }
+ ],
+ "delivery_key": "upgradeInsecureRequests",
+ "excluded_tests": [
+ {
+ // Omit secure requests
+ "expansion": "*",
+ "source_scheme": "*",
+ "source_context_list": "*",
+ "delivery_type": "*",
+ "delivery_value": "*",
+ "redirection": "no-redirect",
+ "subresource": "*",
+ "origin": [
+ "same-https",
+ "cross-https",
+ "same-wss",
+ "cross-wss"
+ ],
+ "expectation": "allowed"
+ },
+ {
+ // For inheriting tests skip http-rp because we already have <meta> tests
+ "expansion": "*",
+ "source_scheme": "*",
+ "source_context_list": [
+ "srcdoc-inherit",
+ "iframe-blank-inherit",
+ "worker-classic-data"
+ ],
+ "delivery_type": "http-rp",
+ "delivery_value": "*",
+ "redirection": "*",
+ "subresource": "*",
+ "origin": "*",
+ "expectation": "*"
+ },
+ {
+ // source_context_list values not yet tested
+ "expansion": "*",
+ "source_scheme": "*",
+ "source_context_list": [
+ "req",
+ "srcdoc",
+ "iframe"
+ ],
+ "delivery_type": "*",
+ "delivery_value": "*",
+ "redirection": "*",
+ "subresource": "*",
+ "origin": "*",
+ "expectation": "*"
+ },
+ {
+ // subresource values not yet tested
+ "expansion": "*",
+ "source_scheme": "*",
+ "source_context_list": "*",
+ "delivery_type": "*",
+ "delivery_value": "*",
+ "redirection": "*",
+ "subresource": [
+ "a-tag",
+ "area-tag",
+ "audio-tag",
+ "beacon",
+ "link-css-tag",
+ "link-prefetch-tag",
+ "object-tag",
+ "picture-tag",
+ "script-tag",
+ "script-tag-dynamic-import",
+ "video-tag"
+ ],
+ "origin": "*",
+ "expectation": "*"
+ },
+ {
+ // origins that upgrade-insecure-requests tests don't care
+ "expansion": "*",
+ "source_scheme": "*",
+ "source_context_list": "*",
+ "delivery_type": "*",
+ "delivery_value": "*",
+ "redirection": "*",
+ "origin": [
+ "same-http",
+ "cross-http",
+ "same-ws",
+ "cross-ws"
+ ],
+ "subresource": "*",
+ "expectation": "*"
+ },
+ {
+ // redirections that upgrade-insecure-requests tests don't care
+ "expansion": "*",
+ "source_scheme": "*",
+ "source_context_list": "*",
+ "delivery_type": "*",
+ "delivery_value": "*",
+ "redirection": [
+ "keep-origin",
+ "swap-origin",
+ "keep-scheme",
+ "swap-scheme"
+ ],
+ "origin": "*",
+ "subresource": "*",
+ "expectation": "*"
+ },
+ ],
+ "source_context_schema": {
+ "supported_delivery_type": {
+ "top": [
+ "http-rp",
+ "meta"
+ ],
+ "iframe": [
+ "http-rp",
+ "meta"
+ ],
+ "iframe-blank": [
+ "meta"
+ ],
+ "srcdoc": [
+ "meta"
+ ],
+ "worker-classic": [
+ "http-rp"
+ ],
+ "worker-module": [
+ "http-rp"
+ ],
+ "worker-classic-data": [],
+ "worker-module-data": [],
+ "sharedworker-classic": [
+ "http-rp"
+ ],
+ "sharedworker-module": [
+ "http-rp"
+ ],
+ "sharedworker-classic-data": [],
+ "sharedworker-module-data": []
+ }
+ },
+ "subresource_schema": {
+ "supported_delivery_type": {
+ "a-tag": [],
+ "area-tag": [],
+ "audio-tag": [],
+ "beacon": [],
+ "fetch": [],
+ "iframe-tag": [],
+ "img-tag": [],
+ "link-css-tag": [],
+ "link-prefetch-tag": [],
+ "object-tag": [],
+ "picture-tag": [],
+ "script-tag": [],
+ "script-tag-dynamic-import": [],
+ "sharedworker-classic": [],
+ "sharedworker-import": [],
+ "sharedworker-import-data": [],
+ "sharedworker-module": [],
+ "video-tag": [],
+ "websocket": [],
+ "worker-classic": [],
+ "worker-import": [],
+ "worker-import-data": [],
+ "worker-module": [],
+ "worklet-animation": [],
+ "worklet-animation-import-data": [],
+ "worklet-audio": [],
+ "worklet-audio-import-data": [],
+ "worklet-layout": [],
+ "worklet-layout-import-data": [],
+ "worklet-paint": [],
+ "worklet-paint-import-data": [],
+ "xhr": []
+ }
+ },
+ "test_expansion_schema": {
+ "delivery_type": [
+ "http-rp",
+ "meta"
+ ],
+ "delivery_value": [
+ null,
+ "upgrade"
+ ],
+ "expectation": [
+ "allowed",
+ "blocked"
+ ]
+ }
+}
diff --git a/testing/web-platform/tests/upgrade-insecure-requests/support/redirect-cors.py b/testing/web-platform/tests/upgrade-insecure-requests/support/redirect-cors.py
new file mode 100644
index 0000000000..58b19a2ce2
--- /dev/null
+++ b/testing/web-platform/tests/upgrade-insecure-requests/support/redirect-cors.py
@@ -0,0 +1,5 @@
+def main(request, response):
+ response.status = 302
+ location = request.GET.first(b"location")
+ response.headers.set(b"Location", location)
+ response.headers.set(b"Access-Control-Allow-Origin", b"*")