servo/tests/wpt/meta/content-security-policy/reporting
Tim van der Lippe 2c116f4011
Fix reporting when only the report-only CSP header is present (#38002)
This was a bit confusing at first, but the report-only only
had an effect if it was used in conjunction with the regular
CSP header. This is incorrect, as the report-only header
can be present on its own.

Additionally, there was double-logic for parsing the CSP list
values, since we can only concatenate CSP lists if we have
an initial value, which requires a concrete policy value.

Therefore, abstract that way by looping over both headers and
handling the case where initially it is `None` and, if the
CSP header is not present, still `None` when we parse
the `report-only` header.

Additionally, update a WPT test. It was expecting the image
to load, yet was showing the fail image.

Part of #4577

Signed-off-by: Tim van der Lippe <tvanderlippe@gmail.com>
2025-07-12 10:38:30 +00:00
..
post-redirect-stacktrace.https.html.ini Implement initial version of ReportingObserver (#37905) 2025-07-07 10:43:30 +00:00
report-clips-sample.https.html.ini Implement trusted HTML sinks for Element (#36941) 2025-05-12 10:53:03 +00:00
report-frame-ancestors-no-parent-cookies.sub.html.ini Run all CSP tests in CI by default. (#36436) 2025-04-10 08:09:23 +00:00
report-frame-ancestors-with-x-frame-options.sub.html.ini Run all CSP tests in CI by default. (#36436) 2025-04-10 08:09:23 +00:00
report-frame-ancestors.sub.html.ini Run all CSP tests in CI by default. (#36436) 2025-04-10 08:09:23 +00:00
report-multiple-violations-01.html.ini Fix reporting when only the report-only CSP header is present (#38002) 2025-07-12 10:38:30 +00:00
report-multiple-violations-02.html.ini Fix reporting when only the report-only CSP header is present (#38002) 2025-07-12 10:38:30 +00:00
report-only-cross-origin-frame.sub.html.ini Run all CSP tests in CI by default. (#36436) 2025-04-10 08:09:23 +00:00
report-original-url-on-mixed-content-frame.https.sub.html.ini Run all CSP tests in CI by default. (#36436) 2025-04-10 08:09:23 +00:00
report-strips-fragment.html.ini Run all CSP tests in CI by default. (#36436) 2025-04-10 08:09:23 +00:00