Closed Bug 1578527 Opened 5 years ago Closed 5 years ago

[wpt-sync] Sync PR 18812 - [DO NOT REVIEW] Move websocket-request,picture-tag,img-tag,classic-data-worker-fetch,fetch-request,video-tag,object-tag,worker-request,link-prefetch-tag,module-worker-top-level,audio-tag,beacon-request,module-data-worker-import…

Categories

(Core :: DOM: Security, task, P4)

task

Tracking

()

RESOLVED FIXED
mozilla71
Tracking Status
firefox71 --- fixed

People

(Reporter: mozilla.org, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream][domsecurity-backlog])

Sync web-platform-tests PR 18812 into mozilla-central (this bug is closed when the sync is complete).

PR: https://github.com/web-platform-tests/wpt/pull/18812
Details from upstream follow.

Hiroshige Hayashizaki <hiroshige@chromium.org> wrote:

[DO NOT REVIEW] Move websocket-request,picture-tag,img-tag,classic-data-worker-fetch,fetch-request,video-tag,object-tag,worker-request,link-prefetch-tag,module-worker-top-level,audio-tag,beacon-request,module-data-worker-import,script-tag,link-css-tag (1)

fix

revert

fix lint

format

[WPT/common/security-features] Support nested source contexts

To enable spec.src.json to specify (possibly nested) source contexts,
this CL adds source_context_list_schema that represents
source contexts from where subresource requests are sent,
and how policies are delivered (by source contexts or subresource requests).
This CL adds source_context_list field to each test_expansion entry,
of which value is the key of source_context_list_schema to be used.

This CL adds source_context_schema and subresource_schema
that represent supported delivery types and subresources
for each source context or subresource type. These are used:

  • To filter out test files for unsupported combinations of delivery types,
    source contexts and subresources.
    A part of the filtering was removed in
    https://chromium-review.googlesource.com/c/chromium/src/+/1717535
    and this CL re-adds it (in a different form of implementation).
  • To determine what delivery types should be used for anotherPolicy
    placeholder.

After this CL, the generate.py generates source_context_list and
subresource_policy_deliveries fields that are passed directly
without coversion.
Specifically,

  • The conversion from classic-data-worker-fetch to
    classic-data-worker + fetch-request in mixed-content-test-case.js
    is removed.
  • \<iframe srcdoc>-related tests for img-tag referrer-policy tests
    are split into separate tests, and related code in
    referrer-policy-test-case.sub.js is removed.
    Instead, to support tests inside \<iframe srcdoc>, this CL adds
    referrerSource calculation that can support \<iframe srcdoc>s.

This CL also changes the structure of generated file names.
Now all files are generated under a dedicated directory gen/.

This CL creates test-case.sub.js instead of modifying
referrer-policy-test-case.sub.js etc., because:
After this CL, I'll commit new generated test HTML files,
incrementally in order to monitor potential regressions,
Because thousands of files are modified, split, and renamed.
During the incremental commits, test-case.sub.js is used
by new generated tests while
referrer-policy-test-case.sub.js etc. are still used by
old tests.
After all commits are done, referrer-policy-test-case.sub.js
etc. will be removed.

test-case.sub.js reflects renaming of JSON keys and values done
in previous commits.

Bug: 906850
Change-Id: Ia6695081e5a93355c29fb1bdb7e89ba6b673261f

Remove fetch-request guard and fix typos

revert sub

Add more validation + rename

more

more

Reorder path

Change-Id: Ice864d30c7b173a1c863b2e0dd40b351e34173da
Reviewed-on: https://chromium-review.googlesource.com/1782135
WPT-Export-Revision: 99f4b71079dbded5e982f59dcc5962cf5c5e9fe1

Component: web-platform-tests → DOM: Security
Product: Testing → Core
Whiteboard: [wptsync downstream] → [wptsync downstream][domsecurity-backlog]
Ran 7 tests and 8 subtests
OK     : 7
PASS   : 7
FAIL   : 1
Pushed by james@hoppipolla.co.uk:
https://hg.mozilla.org/integration/mozilla-inbound/rev/2aaca64b263f
[wpt PR 18812] - [WPT/common/security-features] Support nested source contexts, a=testonly
https://hg.mozilla.org/integration/mozilla-inbound/rev/db58c82ab353
[wpt PR 18812] - Update wpt metadata, a=testonly
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla71
You need to log in before you can comment on or make changes to this bug.