diff --git a/testing/web-platform/tests/content-security-policy/reporting/report-frame-ancestors-no-parent-cookies.sub.html b/testing/web-platform/tests/content-security-policy/reporting/report-frame-ancestors-no-parent-cookies.sub.html new file mode 100644 index 000000000000..b500811c070d --- /dev/null +++ b/testing/web-platform/tests/content-security-policy/reporting/report-frame-ancestors-no-parent-cookies.sub.html @@ -0,0 +1,33 @@ + + + + Cookies are not sent on cross origin violation reports for + frame-ancestors violations, even if the report-uri is same-origin + with the embedder. + + + + + + + + + + diff --git a/testing/web-platform/tests/content-security-policy/reporting/support/not-embeddable-frame.py b/testing/web-platform/tests/content-security-policy/reporting/support/not-embeddable-frame.py index 9e65b4243590..be7e635ac245 100644 --- a/testing/web-platform/tests/content-security-policy/reporting/support/not-embeddable-frame.py +++ b/testing/web-platform/tests/content-security-policy/reporting/support/not-embeddable-frame.py @@ -5,6 +5,7 @@ def main(request, response): csp_header = b'Content-Security-Policy-Report-Only' \ if request.GET.first(b'reportOnly', None) == b'true' else b'Content-Security-Policy' - headers.append((csp_header, b"frame-ancestors 'none'; report-uri /reporting/resources/report.py?op=put&reportID=" + request.GET[b'reportID'])) + report_uri_base = request.GET.first(b'reportUriBase', b'') + headers.append((csp_header, b"frame-ancestors 'none'; report-uri " + report_uri_base + b"/reporting/resources/report.py?op=put&reportID=" + request.GET[b'reportID'])) return headers, b'{}'