Closed Bug 1578512 Opened 6 years ago Closed 1 year ago

[wpt-sync] Sync PR 18805 - [DO NOT REVIEW] Move fetch-request,iframe-tag (2)

Categories

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

task

Tracking

()

RESOLVED INVALID

People

(Reporter: wpt-sync, Unassigned)

References

()

Details

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

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

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

Hiroshige Hayashizaki <hiroshige@chromium.org> wrote:

[DO NOT REVIEW] Move fetch-request,iframe-tag (2)

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: I54db7ac084b96969fb7137959b7308ded7797842
Reviewed-on: https://chromium-review.googlesource.com/1783237
WPT-Export-Revision: 74ebd33bb87c902168e3ebb95769f9ae507ebcde

Component: web-platform-tests → DOM: Security
Product: Testing → Core
Whiteboard: [wptsync downstream] → [wptsync downstream][domsecurity-backlog]
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → INVALID
Status: RESOLVED → REOPENED
Resolution: INVALID → ---
Severity: normal → S3
Severity: normal → S3
Status: REOPENED → RESOLVED
Closed: 5 years ago1 year ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.