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

[WPT/referrer-policy] Move delivery_type control out of test_expansion

A subsequent CL [1] will introduce `delivery_type_schema`
that controls relationship between source contexts,
subresource types, and delivery types.

As a preparation, this CL removes the restriction on `delivery_type`
specified in `elements-not-supporting-attr-referrer`,
`elements-not-supporting-rel-noreferrer`, and
`test_expansion` entries, that will be replaced by
`delivery_type_schema` in [1].

Generated files will be updated after some more changes, not now.
Also, changes needed in JavaScripts to handle new generated values
are not included in this CL and will land later.

Just after this CL, the generator produces more files than before
due to lack of `delivery_type_schema`, but this will be fixed
by [1].

[1] https://chromium-review.googlesource.com/c/chromium/src/+/1586548

Bug: 906850
Change-Id: I3d6ecfc6fc377864884f367ba554c2a7fafac671
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1717535
Commit-Queue: Hiroshige Hayashizaki <hiroshige@chromium.org>
Reviewed-by: default avatarKenichi Ishibashi <bashi@chromium.org>
Reviewed-by: default avatarHiroki Nakagawa <nhiroki@chromium.org>
Cr-Commit-Position: refs/heads/master@{#681098}
parent b68dea23
......@@ -49,7 +49,7 @@ the target request is %(origin)s.'''
meta = ''
headers = []
if delivery_value != None:
if delivery_type == 'meta-referrer':
if delivery_type == 'meta':
meta = \
'<meta name="referrer" content="%s">' % delivery_value
elif delivery_type == 'http-rp':
......@@ -58,10 +58,10 @@ the target request is %(origin)s.'''
headers.append('Referrer-Policy: ' + '%s' % delivery_value)
# TODO(kristijanburnik): Limit to WPT origins.
headers.append('Access-Control-Allow-Origin: *')
elif delivery_type == 'attr-referrer':
elif delivery_type == 'attr':
# attr-referrer is supported by the JS test wrapper.
pass
elif delivery_type == 'rel-noreferrer':
elif delivery_type == 'rel-noref':
# rel=noreferrer is supported by the JS test wrapper.
pass
else:
......
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