[wpt-sync] Sync PR 45255 - Fenced frame: fix CSP tests and CSP check in can load API.
Categories
(Testing :: web-platform-tests, task, P4)
Tracking
(firefox126 fixed)
| Tracking | Status | |
|---|---|---|
| firefox126 | --- | fixed |
People
(Reporter: wpt-sync, Unassigned)
References
()
Details
(Whiteboard: [wptsync downstream])
Attachments
(1 file)
|
135.91 KB,
text/plain
|
Details |
Sync web-platform-tests PR 45255 into mozilla-central (this bug is closed when the sync is complete).
PR: https://github.com/web-platform-tests/wpt/pull/45255
Details from upstream follow.
Liam Brady <lbrady@google.com> wrote:
Fenced frame: fix CSP tests and CSP check in can load API.
The navigator.canLoadAdAuctionFencedFrame() API currently doesn't
properly handle the case when calling it in a document whose content
security policy is "fenced-frame-src: https:". This is because the API
isn't explicitly checking for that specific case. This CL modifies the
function to match the checks inCheckCSPSource()incsp_source.cc.This would've been caught by the CSP WPTs, but those have a bug that
makes them ineffective in catching corner cases. When adding a CSP with
the \<meta> tag, that is a strictly additive operation, and removing the
tag will have no effect on the document's CSP. Since the same page is
re-used through all the promise_tests in the file, each subsequent test
will load with all of the CSPs set in the prior tests. This CL fixes
that by having each test create a subframe that gets the CSP, and
running the test in that subframe.Change-Id: Iea3238cc2b515976468f957ae808277df8c5adc9
Reviewed-on: https://chromium-review.googlesource.com/5378803
WPT-Export-Revision: 47071b15ecda2cffb90a15b24658073e2057ec76
| Assignee | ||
Comment 1•2 years ago
|
||
| Assignee | ||
Comment 2•2 years ago
|
||
Comment 4•2 years ago
|
||
| bugherder | ||
https://hg.mozilla.org/mozilla-central/rev/a1d43aa5d90b
https://hg.mozilla.org/mozilla-central/rev/f689b9dfb5b3
Description
•