Commit e63949cb authored by Hiroshige Hayashizaki's avatar Hiroshige Hayashizaki Committed by Commit Bot

[WPT/common/security-features] Add formatter of spec.src.json

Bug: 906850
Change-Id: I486eef6697a7ef5ff1360549321236add8e1c75b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1717499
Commit-Queue: Hiroshige Hayashizaki <hiroshige@chromium.org>
Reviewed-by: default avatarKenichi Ishibashi <bashi@chromium.org>
Reviewed-by: default avatarHiroki Nakagawa <nhiroki@chromium.org>
Reviewed-by: default avatarMike West <mkwst@chromium.org>
Cr-Commit-Position: refs/heads/master@{#681079}
parent da365165
import collections
import json
import os
def main():
'''Formats spec.src.json.'''
script_directory = os.path.dirname(os.path.abspath(__file__))
for dir in ['mixed-content', 'referrer-policy']:
filename = os.path.join(script_directory, '..', '..', '..', dir,
'spec.src.json')
spec = json.load(
open(filename, 'r'), object_pairs_hook=collections.OrderedDict)
with open(filename, 'w') as f:
f.write(json.dumps(spec, indent=2, separators=(',', ': ')))
f.write('\n')
if __name__ == '__main__':
main()
...@@ -17,7 +17,10 @@ ...@@ -17,7 +17,10 @@
"blockable": [], "blockable": [],
"optionally-blockable": "*" "optionally-blockable": "*"
}, },
"origin": ["cross-origin-http", "same-host-http"], "origin": [
"cross-origin-http",
"same-host-http"
],
"expectation": "blocked" "expectation": "blocked"
}, },
{ {
...@@ -31,7 +34,10 @@ ...@@ -31,7 +34,10 @@
"blockable": [], "blockable": [],
"optionally-blockable": "*" "optionally-blockable": "*"
}, },
"origin": ["cross-origin-http", "same-host-http"], "origin": [
"cross-origin-http",
"same-host-http"
],
"expectation": "allowed" "expectation": "allowed"
} }
] ]
...@@ -53,7 +59,10 @@ ...@@ -53,7 +59,10 @@
"blockable": "*", "blockable": "*",
"optionally-blockable": [] "optionally-blockable": []
}, },
"origin": ["cross-origin-http", "same-host-http"], "origin": [
"cross-origin-http",
"same-host-http"
],
"expectation": "blocked" "expectation": "blocked"
}, },
{ {
...@@ -67,7 +76,10 @@ ...@@ -67,7 +76,10 @@
"blockable": "*", "blockable": "*",
"optionally-blockable": [] "optionally-blockable": []
}, },
"origin": ["cross-origin-http", "same-host-http"], "origin": [
"cross-origin-http",
"same-host-http"
],
"expectation": "blocked" "expectation": "blocked"
}, },
{ {
...@@ -81,7 +93,10 @@ ...@@ -81,7 +93,10 @@
"blockable": "websocket-request", "blockable": "websocket-request",
"optionally-blockable": [] "optionally-blockable": []
}, },
"origin": ["cross-origin-ws", "same-host-ws"], "origin": [
"cross-origin-ws",
"same-host-ws"
],
"expectation": "blocked" "expectation": "blocked"
} }
] ]
...@@ -98,12 +113,17 @@ ...@@ -98,12 +113,17 @@
"source_protocol": "https", "source_protocol": "https",
"delivery_type": "*", "delivery_type": "*",
"delivery_value": "*", "delivery_value": "*",
"redirection": ["no-redirect", "keep-scheme-redirect"], "redirection": [
"no-redirect",
"keep-scheme-redirect"
],
"subresource": { "subresource": {
"blockable": "*", "blockable": "*",
"optionally-blockable": "*" "optionally-blockable": "*"
}, },
"origin": ["same-host-https"], "origin": [
"same-host-https"
],
"expectation": "allowed" "expectation": "allowed"
}, },
{ {
...@@ -112,20 +132,23 @@ ...@@ -112,20 +132,23 @@
"source_protocol": "https", "source_protocol": "https",
"delivery_type": "*", "delivery_type": "*",
"delivery_value": "*", "delivery_value": "*",
"redirection": ["no-redirect", "keep-scheme-redirect"], "redirection": [
"no-redirect",
"keep-scheme-redirect"
],
"subresource": { "subresource": {
"blockable": "websocket-request", "blockable": "websocket-request",
"optionally-blockable": [] "optionally-blockable": []
}, },
"origin": ["same-host-wss"], "origin": [
"same-host-wss"
],
"expectation": "allowed" "expectation": "allowed"
} }
] ]
} }
], ],
"delivery_key": "mixedContent", "delivery_key": "mixedContent",
"excluded_tests": [ "excluded_tests": [
{ {
"name": "Skip-redundant-no-opt-in", "name": "Skip-redundant-no-opt-in",
...@@ -184,7 +207,10 @@ ...@@ -184,7 +207,10 @@
"source_protocol": "*", "source_protocol": "*",
"delivery_type": "meta", "delivery_type": "meta",
"delivery_value": "opt-in", "delivery_value": "opt-in",
"redirection": ["keep-scheme-redirect", "swap-scheme-redirect"], "redirection": [
"keep-scheme-redirect",
"swap-scheme-redirect"
],
"subresource": { "subresource": {
"blockable": "*", "blockable": "*",
"optionally-blockable": "*" "optionally-blockable": "*"
...@@ -193,7 +219,6 @@ ...@@ -193,7 +219,6 @@
"expectation": "*" "expectation": "*"
} }
], ],
"test_expansion_schema": { "test_expansion_schema": {
"expansion": [ "expansion": [
"default", "default",
......
...@@ -30,6 +30,8 @@ Invoking ```./generic/tools/generate.py``` will parse the spec JSON and determin ...@@ -30,6 +30,8 @@ Invoking ```./generic/tools/generate.py``` will parse the spec JSON and determin
The spec can be validated by running ```./generic/tools/spec_validator.py```. This is specially important when you're making changes to ```spec.src.json```. Make sure it's a valid JSON (no comments or trailing commas). The validator should be informative and very specific on any issues. The spec can be validated by running ```./generic/tools/spec_validator.py```. This is specially important when you're making changes to ```spec.src.json```. Make sure it's a valid JSON (no comments or trailing commas). The validator should be informative and very specific on any issues.
The ```spec.src.json``` file can be formatted by running ```../common/security-features/tools/format_spec_src_json.py```.
For details about the spec JSON, see **Overview of the spec JSON** below. For details about the spec JSON, see **Overview of the spec JSON** below.
......
...@@ -11,7 +11,11 @@ ...@@ -11,7 +11,11 @@
"expansion": "default", "expansion": "default",
"source_protocol": "http", "source_protocol": "http",
"target_protocol": "http", "target_protocol": "http",
"delivery_type": ["http-rp", "meta-referrer", "attr-referrer"], "delivery_type": [
"http-rp",
"meta-referrer",
"attr-referrer"
],
"delivery_value": null, "delivery_value": null,
"redirection": "*", "redirection": "*",
"origin": "*", "origin": "*",
...@@ -23,7 +27,11 @@ ...@@ -23,7 +27,11 @@
"expansion": "default", "expansion": "default",
"source_protocol": "http", "source_protocol": "http",
"target_protocol": "https", "target_protocol": "https",
"delivery_type": ["http-rp", "meta-referrer", "attr-referrer"], "delivery_type": [
"http-rp",
"meta-referrer",
"attr-referrer"
],
"delivery_value": null, "delivery_value": null,
"redirection": "*", "redirection": "*",
"origin": "*", "origin": "*",
...@@ -35,7 +43,11 @@ ...@@ -35,7 +43,11 @@
"expansion": "default", "expansion": "default",
"source_protocol": "https", "source_protocol": "https",
"target_protocol": "http", "target_protocol": "http",
"delivery_type": ["http-rp", "meta-referrer", "attr-referrer"], "delivery_type": [
"http-rp",
"meta-referrer",
"attr-referrer"
],
"delivery_value": null, "delivery_value": null,
"redirection": "*", "redirection": "*",
"origin": "*", "origin": "*",
...@@ -47,7 +59,11 @@ ...@@ -47,7 +59,11 @@
"expansion": "default", "expansion": "default",
"source_protocol": "https", "source_protocol": "https",
"target_protocol": "https", "target_protocol": "https",
"delivery_type": ["http-rp", "meta-referrer", "attr-referrer"], "delivery_type": [
"http-rp",
"meta-referrer",
"attr-referrer"
],
"delivery_value": null, "delivery_value": null,
"redirection": "*", "redirection": "*",
"origin": "*", "origin": "*",
...@@ -67,7 +83,11 @@ ...@@ -67,7 +83,11 @@
"expansion": "default", "expansion": "default",
"source_protocol": "*", "source_protocol": "*",
"target_protocol": "*", "target_protocol": "*",
"delivery_type": ["http-rp", "meta-referrer", "attr-referrer"], "delivery_type": [
"http-rp",
"meta-referrer",
"attr-referrer"
],
"delivery_value": "no-referrer", "delivery_value": "no-referrer",
"redirection": "*", "redirection": "*",
"origin": "*", "origin": "*",
...@@ -87,7 +107,11 @@ ...@@ -87,7 +107,11 @@
"expansion": "default", "expansion": "default",
"source_protocol": "http", "source_protocol": "http",
"target_protocol": "http", "target_protocol": "http",
"delivery_type": ["http-rp", "meta-referrer", "attr-referrer"], "delivery_type": [
"http-rp",
"meta-referrer",
"attr-referrer"
],
"delivery_value": "no-referrer-when-downgrade", "delivery_value": "no-referrer-when-downgrade",
"redirection": "*", "redirection": "*",
"origin": "*", "origin": "*",
...@@ -99,7 +123,11 @@ ...@@ -99,7 +123,11 @@
"expansion": "default", "expansion": "default",
"source_protocol": "http", "source_protocol": "http",
"target_protocol": "https", "target_protocol": "https",
"delivery_type": ["http-rp", "meta-referrer", "attr-referrer"], "delivery_type": [
"http-rp",
"meta-referrer",
"attr-referrer"
],
"delivery_value": "no-referrer-when-downgrade", "delivery_value": "no-referrer-when-downgrade",
"redirection": "*", "redirection": "*",
"origin": "*", "origin": "*",
...@@ -111,7 +139,11 @@ ...@@ -111,7 +139,11 @@
"expansion": "default", "expansion": "default",
"source_protocol": "https", "source_protocol": "https",
"target_protocol": "http", "target_protocol": "http",
"delivery_type": ["http-rp", "meta-referrer", "attr-referrer"], "delivery_type": [
"http-rp",
"meta-referrer",
"attr-referrer"
],
"delivery_value": "no-referrer-when-downgrade", "delivery_value": "no-referrer-when-downgrade",
"redirection": "*", "redirection": "*",
"origin": "*", "origin": "*",
...@@ -123,7 +155,11 @@ ...@@ -123,7 +155,11 @@
"expansion": "default", "expansion": "default",
"source_protocol": "https", "source_protocol": "https",
"target_protocol": "https", "target_protocol": "https",
"delivery_type": ["http-rp", "meta-referrer", "attr-referrer"], "delivery_type": [
"http-rp",
"meta-referrer",
"attr-referrer"
],
"delivery_value": "no-referrer-when-downgrade", "delivery_value": "no-referrer-when-downgrade",
"redirection": "*", "redirection": "*",
"origin": "*", "origin": "*",
...@@ -143,7 +179,11 @@ ...@@ -143,7 +179,11 @@
"expansion": "default", "expansion": "default",
"source_protocol": "*", "source_protocol": "*",
"target_protocol": "*", "target_protocol": "*",
"delivery_type": ["http-rp", "meta-referrer", "attr-referrer"], "delivery_type": [
"http-rp",
"meta-referrer",
"attr-referrer"
],
"delivery_value": "origin", "delivery_value": "origin",
"redirection": "*", "redirection": "*",
"origin": "*", "origin": "*",
...@@ -163,7 +203,11 @@ ...@@ -163,7 +203,11 @@
"expansion": "default", "expansion": "default",
"source_protocol": "http", "source_protocol": "http",
"target_protocol": "http", "target_protocol": "http",
"delivery_type": ["http-rp", "meta-referrer", "attr-referrer"], "delivery_type": [
"http-rp",
"meta-referrer",
"attr-referrer"
],
"delivery_value": "same-origin", "delivery_value": "same-origin",
"redirection": "*", "redirection": "*",
"origin": "same-origin", "origin": "same-origin",
...@@ -175,7 +219,11 @@ ...@@ -175,7 +219,11 @@
"expansion": "default", "expansion": "default",
"source_protocol": "https", "source_protocol": "https",
"target_protocol": "https", "target_protocol": "https",
"delivery_type": ["http-rp", "meta-referrer", "attr-referrer"], "delivery_type": [
"http-rp",
"meta-referrer",
"attr-referrer"
],
"delivery_value": "same-origin", "delivery_value": "same-origin",
"redirection": "*", "redirection": "*",
"origin": "same-origin", "origin": "same-origin",
...@@ -187,7 +235,11 @@ ...@@ -187,7 +235,11 @@
"expansion": "override", "expansion": "override",
"source_protocol": "*", "source_protocol": "*",
"target_protocol": "*", "target_protocol": "*",
"delivery_type": ["http-rp", "meta-referrer", "attr-referrer"], "delivery_type": [
"http-rp",
"meta-referrer",
"attr-referrer"
],
"delivery_value": "same-origin", "delivery_value": "same-origin",
"redirection": "swap-origin-redirect", "redirection": "swap-origin-redirect",
"origin": "same-origin", "origin": "same-origin",
...@@ -199,7 +251,11 @@ ...@@ -199,7 +251,11 @@
"expansion": "default", "expansion": "default",
"source_protocol": "*", "source_protocol": "*",
"target_protocol": "*", "target_protocol": "*",
"delivery_type": ["http-rp", "meta-referrer", "attr-referrer"], "delivery_type": [
"http-rp",
"meta-referrer",
"attr-referrer"
],
"delivery_value": "same-origin", "delivery_value": "same-origin",
"redirection": "*", "redirection": "*",
"origin": "cross-origin", "origin": "cross-origin",
...@@ -219,7 +275,11 @@ ...@@ -219,7 +275,11 @@
"expansion": "default", "expansion": "default",
"source_protocol": "http", "source_protocol": "http",
"target_protocol": "http", "target_protocol": "http",
"delivery_type": ["http-rp", "meta-referrer", "attr-referrer"], "delivery_type": [
"http-rp",
"meta-referrer",
"attr-referrer"
],
"delivery_value": "origin-when-cross-origin", "delivery_value": "origin-when-cross-origin",
"redirection": "*", "redirection": "*",
"origin": "same-origin", "origin": "same-origin",
...@@ -231,7 +291,11 @@ ...@@ -231,7 +291,11 @@
"expansion": "default", "expansion": "default",
"source_protocol": "https", "source_protocol": "https",
"target_protocol": "https", "target_protocol": "https",
"delivery_type": ["http-rp", "meta-referrer", "attr-referrer"], "delivery_type": [
"http-rp",
"meta-referrer",
"attr-referrer"
],
"delivery_value": "origin-when-cross-origin", "delivery_value": "origin-when-cross-origin",
"redirection": "*", "redirection": "*",
"origin": "same-origin", "origin": "same-origin",
...@@ -243,7 +307,11 @@ ...@@ -243,7 +307,11 @@
"expansion": "default", "expansion": "default",
"source_protocol": "http", "source_protocol": "http",
"target_protocol": "https", "target_protocol": "https",
"delivery_type": ["http-rp", "meta-referrer", "attr-referrer"], "delivery_type": [
"http-rp",
"meta-referrer",
"attr-referrer"
],
"delivery_value": "origin-when-cross-origin", "delivery_value": "origin-when-cross-origin",
"redirection": "*", "redirection": "*",
"origin": "same-origin", "origin": "same-origin",
...@@ -255,7 +323,11 @@ ...@@ -255,7 +323,11 @@
"expansion": "default", "expansion": "default",
"source_protocol": "https", "source_protocol": "https",
"target_protocol": "http", "target_protocol": "http",
"delivery_type": ["http-rp", "meta-referrer", "attr-referrer"], "delivery_type": [
"http-rp",
"meta-referrer",
"attr-referrer"
],
"delivery_value": "origin-when-cross-origin", "delivery_value": "origin-when-cross-origin",
"redirection": "*", "redirection": "*",
"origin": "same-origin", "origin": "same-origin",
...@@ -267,7 +339,11 @@ ...@@ -267,7 +339,11 @@
"expansion": "override", "expansion": "override",
"source_protocol": "*", "source_protocol": "*",
"target_protocol": "*", "target_protocol": "*",
"delivery_type": ["http-rp", "meta-referrer", "attr-referrer"], "delivery_type": [
"http-rp",
"meta-referrer",
"attr-referrer"
],
"delivery_value": "origin-when-cross-origin", "delivery_value": "origin-when-cross-origin",
"redirection": "swap-origin-redirect", "redirection": "swap-origin-redirect",
"origin": "same-origin", "origin": "same-origin",
...@@ -279,7 +355,11 @@ ...@@ -279,7 +355,11 @@
"expansion": "default", "expansion": "default",
"source_protocol": "*", "source_protocol": "*",
"target_protocol": "*", "target_protocol": "*",
"delivery_type": ["http-rp", "meta-referrer", "attr-referrer"], "delivery_type": [
"http-rp",
"meta-referrer",
"attr-referrer"
],
"delivery_value": "origin-when-cross-origin", "delivery_value": "origin-when-cross-origin",
"redirection": "*", "redirection": "*",
"origin": "cross-origin", "origin": "cross-origin",
...@@ -299,7 +379,11 @@ ...@@ -299,7 +379,11 @@
"expansion": "default", "expansion": "default",
"source_protocol": "http", "source_protocol": "http",
"target_protocol": "http", "target_protocol": "http",
"delivery_type": ["http-rp", "meta-referrer", "attr-referrer"], "delivery_type": [
"http-rp",
"meta-referrer",
"attr-referrer"
],
"delivery_value": "strict-origin", "delivery_value": "strict-origin",
"redirection": "*", "redirection": "*",
"origin": "*", "origin": "*",
...@@ -311,7 +395,11 @@ ...@@ -311,7 +395,11 @@
"expansion": "default", "expansion": "default",
"source_protocol": "http", "source_protocol": "http",
"target_protocol": "https", "target_protocol": "https",
"delivery_type": ["http-rp", "meta-referrer", "attr-referrer"], "delivery_type": [
"http-rp",
"meta-referrer",
"attr-referrer"
],
"delivery_value": "strict-origin", "delivery_value": "strict-origin",
"redirection": "*", "redirection": "*",
"origin": "*", "origin": "*",
...@@ -323,7 +411,11 @@ ...@@ -323,7 +411,11 @@
"expansion": "default", "expansion": "default",
"source_protocol": "https", "source_protocol": "https",
"target_protocol": "http", "target_protocol": "http",
"delivery_type": ["http-rp", "meta-referrer", "attr-referrer"], "delivery_type": [
"http-rp",
"meta-referrer",
"attr-referrer"
],
"delivery_value": "strict-origin", "delivery_value": "strict-origin",
"redirection": "*", "redirection": "*",
"origin": "*", "origin": "*",
...@@ -335,7 +427,11 @@ ...@@ -335,7 +427,11 @@
"expansion": "default", "expansion": "default",
"source_protocol": "https", "source_protocol": "https",
"target_protocol": "https", "target_protocol": "https",
"delivery_type": ["http-rp", "meta-referrer", "attr-referrer"], "delivery_type": [
"http-rp",
"meta-referrer",
"attr-referrer"
],
"delivery_value": "strict-origin", "delivery_value": "strict-origin",
"redirection": "*", "redirection": "*",
"origin": "*", "origin": "*",
...@@ -355,7 +451,11 @@ ...@@ -355,7 +451,11 @@
"expansion": "default", "expansion": "default",
"source_protocol": "http", "source_protocol": "http",
"target_protocol": "http", "target_protocol": "http",
"delivery_type": ["http-rp", "meta-referrer", "attr-referrer"], "delivery_type": [
"http-rp",
"meta-referrer",
"attr-referrer"
],
"delivery_value": "strict-origin-when-cross-origin", "delivery_value": "strict-origin-when-cross-origin",
"redirection": "*", "redirection": "*",
"origin": "same-origin", "origin": "same-origin",
...@@ -367,7 +467,11 @@ ...@@ -367,7 +467,11 @@
"expansion": "override", "expansion": "override",
"source_protocol": "http", "source_protocol": "http",
"target_protocol": "http", "target_protocol": "http",
"delivery_type": ["http-rp", "meta-referrer", "attr-referrer"], "delivery_type": [
"http-rp",
"meta-referrer",
"attr-referrer"
],
"delivery_value": "strict-origin-when-cross-origin", "delivery_value": "strict-origin-when-cross-origin",
"redirection": "swap-origin-redirect", "redirection": "swap-origin-redirect",
"origin": "same-origin", "origin": "same-origin",
...@@ -379,7 +483,11 @@ ...@@ -379,7 +483,11 @@
"expansion": "default", "expansion": "default",
"source_protocol": "http", "source_protocol": "http",
"target_protocol": "http", "target_protocol": "http",
"delivery_type": ["http-rp", "meta-referrer", "attr-referrer"], "delivery_type": [
"http-rp",
"meta-referrer",
"attr-referrer"
],
"delivery_value": "strict-origin-when-cross-origin", "delivery_value": "strict-origin-when-cross-origin",
"redirection": "*", "redirection": "*",
"origin": "cross-origin", "origin": "cross-origin",
...@@ -391,7 +499,11 @@ ...@@ -391,7 +499,11 @@
"expansion": "default", "expansion": "default",
"source_protocol": "http", "source_protocol": "http",
"target_protocol": "https", "target_protocol": "https",
"delivery_type": ["http-rp", "meta-referrer", "attr-referrer"], "delivery_type": [
"http-rp",
"meta-referrer",
"attr-referrer"
],
"delivery_value": "strict-origin-when-cross-origin", "delivery_value": "strict-origin-when-cross-origin",
"redirection": "*", "redirection": "*",
"origin": "*", "origin": "*",
...@@ -403,7 +515,11 @@ ...@@ -403,7 +515,11 @@
"expansion": "default", "expansion": "default",
"source_protocol": "https", "source_protocol": "https",
"target_protocol": "http", "target_protocol": "http",
"delivery_type": ["http-rp", "meta-referrer", "attr-referrer"], "delivery_type": [
"http-rp",
"meta-referrer",
"attr-referrer"
],
"delivery_value": "strict-origin-when-cross-origin", "delivery_value": "strict-origin-when-cross-origin",
"redirection": "*", "redirection": "*",
"origin": "*", "origin": "*",
...@@ -415,7 +531,11 @@ ...@@ -415,7 +531,11 @@
"expansion": "default", "expansion": "default",
"source_protocol": "https", "source_protocol": "https",
"target_protocol": "https", "target_protocol": "https",
"delivery_type": ["http-rp", "meta-referrer", "attr-referrer"], "delivery_type": [
"http-rp",
"meta-referrer",
"attr-referrer"
],
"delivery_value": "strict-origin-when-cross-origin", "delivery_value": "strict-origin-when-cross-origin",
"redirection": "*", "redirection": "*",
"origin": "same-origin", "origin": "same-origin",
...@@ -427,7 +547,11 @@ ...@@ -427,7 +547,11 @@
"expansion": "override", "expansion": "override",
"source_protocol": "https", "source_protocol": "https",
"target_protocol": "https", "target_protocol": "https",
"delivery_type": ["http-rp", "meta-referrer", "attr-referrer"], "delivery_type": [
"http-rp",
"meta-referrer",
"attr-referrer"
],
"delivery_value": "strict-origin-when-cross-origin", "delivery_value": "strict-origin-when-cross-origin",
"redirection": "swap-origin-redirect", "redirection": "swap-origin-redirect",
"origin": "same-origin", "origin": "same-origin",
...@@ -439,7 +563,11 @@ ...@@ -439,7 +563,11 @@
"expansion": "default", "expansion": "default",
"source_protocol": "https", "source_protocol": "https",
"target_protocol": "https", "target_protocol": "https",
"delivery_type": ["http-rp", "meta-referrer", "attr-referrer"], "delivery_type": [
"http-rp",
"meta-referrer",
"attr-referrer"
],
"delivery_value": "strict-origin-when-cross-origin", "delivery_value": "strict-origin-when-cross-origin",
"redirection": "*", "redirection": "*",
"origin": "cross-origin", "origin": "cross-origin",
...@@ -459,7 +587,11 @@ ...@@ -459,7 +587,11 @@
"expansion": "default", "expansion": "default",
"source_protocol": "*", "source_protocol": "*",
"target_protocol": "*", "target_protocol": "*",
"delivery_type": ["http-rp", "meta-referrer", "attr-referrer"], "delivery_type": [
"http-rp",
"meta-referrer",
"attr-referrer"
],
"delivery_value": "unsafe-url", "delivery_value": "unsafe-url",
"redirection": "*", "redirection": "*",
"origin": "*", "origin": "*",
...@@ -469,10 +601,8 @@ ...@@ -469,10 +601,8 @@
] ]
} }
], ],
"delivery_key": "referrerPolicy", "delivery_key": "referrerPolicy",
"excluded_tests": [
"excluded_tests":[
{ {
"name": "cross-origin-workers", "name": "cross-origin-workers",
"expansion": "*", "expansion": "*",
...@@ -522,7 +652,9 @@ ...@@ -522,7 +652,9 @@
"expansion": "*", "expansion": "*",
"source_protocol": "*", "source_protocol": "*",
"target_protocol": "*", "target_protocol": "*",
"delivery_type": ["attr-referrer"], "delivery_type": [
"attr-referrer"
],
"delivery_value": "*", "delivery_value": "*",
"redirection": "*", "redirection": "*",
"origin": "*", "origin": "*",
...@@ -540,7 +672,9 @@ ...@@ -540,7 +672,9 @@
"expansion": "*", "expansion": "*",
"source_protocol": "*", "source_protocol": "*",
"target_protocol": "*", "target_protocol": "*",
"delivery_type": ["rel-noreferrer"], "delivery_type": [
"rel-noreferrer"
],
"delivery_value": "*", "delivery_value": "*",
"redirection": "*", "redirection": "*",
"origin": "*", "origin": "*",
...@@ -592,9 +726,15 @@ ...@@ -592,9 +726,15 @@
"target_protocol": "*", "target_protocol": "*",
"delivery_type": "*", "delivery_type": "*",
"delivery_value": "*", "delivery_value": "*",
"redirection": ["keep-origin-redirect", "swap-origin-redirect"], "redirection": [
"keep-origin-redirect",
"swap-origin-redirect"
],
"origin": "*", "origin": "*",
"subresource": ["a-tag", "area-tag"], "subresource": [
"a-tag",
"area-tag"
],
"expectation": "*" "expectation": "*"
}, },
{ {
...@@ -610,20 +750,17 @@ ...@@ -610,20 +750,17 @@
"expectation": "*" "expectation": "*"
} }
], ],
"test_expansion_schema": { "test_expansion_schema": {
"expansion": [ "expansion": [
"default", "default",
"override" "override"
], ],
"delivery_type": [ "delivery_type": [
"http-rp", "http-rp",
"meta-referrer", "meta-referrer",
"attr-referrer", "attr-referrer",
"rel-noreferrer" "rel-noreferrer"
], ],
"delivery_value": [ "delivery_value": [
null, null,
"no-referrer", "no-referrer",
...@@ -635,28 +772,23 @@ ...@@ -635,28 +772,23 @@
"strict-origin-when-cross-origin", "strict-origin-when-cross-origin",
"unsafe-url" "unsafe-url"
], ],
"origin": [ "origin": [
"same-origin", "same-origin",
"cross-origin" "cross-origin"
], ],
"source_protocol": [ "source_protocol": [
"http", "http",
"https" "https"
], ],
"target_protocol": [ "target_protocol": [
"http", "http",
"https" "https"
], ],
"redirection": [ "redirection": [
"no-redirect", "no-redirect",
"keep-origin-redirect", "keep-origin-redirect",
"swap-origin-redirect" "swap-origin-redirect"
], ],
"subresource": [ "subresource": [
"iframe-tag", "iframe-tag",
"img-tag", "img-tag",
...@@ -669,7 +801,6 @@ ...@@ -669,7 +801,6 @@
"shared-worker", "shared-worker",
"fetch-request" "fetch-request"
], ],
"expectation": [ "expectation": [
"omitted", "omitted",
"origin", "origin",
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment