Closed Bug 1546960 Opened 6 years ago Closed 6 years ago

[wpt-sync] Sync PR 16477 - [WPT/common/security-features] Support requests from nested contexts

Categories

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

defect

Tracking

()

RESOLVED FIXED
mozilla69
Tracking Status
firefox69 --- fixed

People

(Reporter: wpt-sync, Unassigned)

References

()

Details

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

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

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

Hiroshige Hayashizaki <hiroshige@chromium.org> wrote:

[WPT/common/security-features] Support requests from nested contexts

This CL introduces invokeRequest() that enables testing
requests triggered from inside nested contexts such as
iframes and workers.
This CL defines data formats to represent nested contexts
and policies applied to each context in the nested contexts, and
passes them around invokeRequest() and files under
common/security-features/scope/ that serve the sub contexts
(e.g. iframe HTMLs).

By using this mechanism, this CL merges
requestViaImageForReferrerPolicy() into requestViaImage().
Previously, the function tests three patterns of requests
(some involving srcdoc iframes).
Instead, this CL calls invokeRequest() for each pattern
separately. This is applied to all subresource types, and
thus this CL extends referrer policy test coverage
to srcdoc iframes.

In some manually-written tests, requestViaImageForReferrerPolicy()
is simply replaced with requestViaImage(), but this is
probably safe because the focus of the tests are not related
to nested contexts and the inheritance between the contexts.

Bug: 906850
Change-Id: I88ebde4a59522ceb78893717c2f83db33376e241
Reviewed-on: https://chromium-review.googlesource.com/1565621
WPT-Export-Revision: f506881e95b8c0c20ddeba6c2c4437d2ad575e2b

PR 16477 applied with additional changes from upstream: b93752a06f9498f774aed288663259cd738f1a7c, 61005092864836e14985290c47b4a797991815a6, d524f330e260695315b7e0214e60c24d0a4c1e80, bb28be227b87ddd08797b97f4269ed0e487819d3, 3e47a3529df73a75d224e28fadcf56097e71b090
Component: web-platform-tests → DOM: Security
Product: Testing → Core
Whiteboard: [wptsync downstream] → [wptsync downstream][domsecurity-backlog]
Whiteboard: [wptsync downstream][domsecurity-backlog] → [wptsync downstream error][domsecurity-backlog]
Whiteboard: [wptsync downstream error][domsecurity-backlog] → [wptsync downstream][domsecurity-backlog]
Whiteboard: [wptsync downstream][domsecurity-backlog] → [wptsync downstream error][domsecurity-backlog]
Whiteboard: [wptsync downstream error][domsecurity-backlog] → [wptsync downstream][domsecurity-backlog]
Whiteboard: [wptsync downstream][domsecurity-backlog] → [wptsync downstream error][domsecurity-backlog]
Whiteboard: [wptsync downstream error][domsecurity-backlog] → [wptsync downstream][domsecurity-backlog]
Whiteboard: [wptsync downstream][domsecurity-backlog] → [wptsync downstream error][domsecurity-backlog]
Whiteboard: [wptsync downstream error][domsecurity-backlog] → [wptsync downstream][domsecurity-backlog]
Whiteboard: [wptsync downstream][domsecurity-backlog] → [wptsync downstream error][domsecurity-backlog]
Pushed by james@hoppipolla.co.uk: https://hg.mozilla.org/integration/mozilla-inbound/rev/c6a8d9329e22 [wpt PR 16477] - [WPT/common/security-features] Support requests from nested contexts, a=testonly
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla69
You need to log in before you can comment on or make changes to this bug.