Branch: refs/heads/main Home: https://github.com/WebKit/WebKit Commit: 8ae6f494b9976c5184a6e8058574f43d6ea77782 https://github.com/WebKit/WebKit/commit/8ae6f494b9976c5184a6e8058574f43d6ea77782 Author: Brent Fulgham <bfulg...@webkit.org> Date: 2022-10-21 (Fri, 21 Oct 2022)
Changed paths: M LayoutTests/http/tests/security/contentSecurityPolicy/1.1/frame-ancestors/report-frame-ancestors-cross-origin-expected.txt M LayoutTests/http/tests/security/contentSecurityPolicy/1.1/frame-ancestors/report-frame-ancestors-cross-origin-https-expected.txt M LayoutTests/http/tests/security/contentSecurityPolicy/1.1/frame-ancestors/report-frame-ancestors-same-origin-expected.txt M LayoutTests/http/tests/security/contentSecurityPolicy/1.1/frame-ancestors/report-frame-ancestors-same-origin-https-expected.txt M LayoutTests/http/tests/security/contentSecurityPolicy/1.1/report-uri-effective-directive-expected.txt M LayoutTests/http/tests/security/contentSecurityPolicy/1.1/script-blocked-sends-multiple-reports-expected.txt M LayoutTests/http/tests/security/contentSecurityPolicy/1.1/scripthash-allowed-by-enforced-policy-and-blocked-by-report-policy-expected.txt M LayoutTests/http/tests/security/contentSecurityPolicy/1.1/scripthash-allowed-by-enforced-policy-and-blocked-by-report-policy2-expected.txt M LayoutTests/http/tests/security/contentSecurityPolicy/1.1/scripthash-allowed-by-legacy-enforced-policy-and-blocked-by-report-policy-expected.txt M LayoutTests/http/tests/security/contentSecurityPolicy/1.1/scripthash-allowed-by-legacy-enforced-policy-and-blocked-by-report-policy2-expected.txt M LayoutTests/http/tests/security/contentSecurityPolicy/1.1/scripthash-blocked-by-enforced-policy-and-allowed-by-report-policy-expected.txt M LayoutTests/http/tests/security/contentSecurityPolicy/1.1/scripthash-blocked-by-legacy-enforced-policy-and-blocked-by-report-policy-expected.txt M LayoutTests/http/tests/security/contentSecurityPolicy/1.1/scripthash-blocked-by-legacy-enforced-policy-and-blocked-by-report-policy2-expected.txt M LayoutTests/http/tests/security/contentSecurityPolicy/1.1/scriptnonce-blocked-by-enforced-policy-and-allowed-by-report-policy-expected.txt M LayoutTests/http/tests/security/contentSecurityPolicy/report-and-enforce-expected.txt M LayoutTests/http/tests/security/contentSecurityPolicy/report-blocked-data-uri-expected.txt M LayoutTests/http/tests/security/contentSecurityPolicy/report-blocked-file-uri-expected.txt M LayoutTests/http/tests/security/contentSecurityPolicy/report-blocked-uri-and-do-not-follow-redirect-when-sending-report-expected.txt M LayoutTests/http/tests/security/contentSecurityPolicy/report-blocked-uri-cross-origin-expected.txt M LayoutTests/http/tests/security/contentSecurityPolicy/report-blocked-uri-expected.txt M LayoutTests/http/tests/security/contentSecurityPolicy/report-cross-origin-no-cookies-expected.txt M LayoutTests/http/tests/security/contentSecurityPolicy/report-cross-origin-no-cookies-when-private-browsing-enabled-expected.txt M LayoutTests/http/tests/security/contentSecurityPolicy/report-cross-origin-no-cookies-when-private-browsing-toggled-expected.txt M LayoutTests/http/tests/security/contentSecurityPolicy/report-only-expected.txt M LayoutTests/http/tests/security/contentSecurityPolicy/report-only-from-header-expected.txt M LayoutTests/http/tests/security/contentSecurityPolicy/report-only-upgrade-insecure-expected.txt M LayoutTests/http/tests/security/contentSecurityPolicy/report-same-origin-no-cookies-when-private-browsing-toggled-expected.txt M LayoutTests/http/tests/security/contentSecurityPolicy/report-same-origin-with-cookies-expected.txt M LayoutTests/http/tests/security/contentSecurityPolicy/report-same-origin-with-cookies-when-private-browsing-enabled-expected.txt M LayoutTests/http/tests/security/contentSecurityPolicy/report-status-code-zero-when-using-https-expected.txt M LayoutTests/http/tests/security/contentSecurityPolicy/report-uri-expected.txt M LayoutTests/http/tests/security/contentSecurityPolicy/report-uri-from-child-frame-expected.txt M LayoutTests/http/tests/security/contentSecurityPolicy/report-uri-from-inline-javascript-expected.txt M LayoutTests/http/tests/security/contentSecurityPolicy/report-uri-from-javascript-expected.txt M LayoutTests/http/tests/security/contentSecurityPolicy/report-uri-scheme-relative-expected.txt M LayoutTests/http/tests/security/contentSecurityPolicy/script-src-strict-dynamic-inline-report-expected.txt A LayoutTests/imported/w3c/web-platform-tests/reporting/generateTestReport-honors-endpoint.http.sub-expected.txt A LayoutTests/imported/w3c/web-platform-tests/reporting/generateTestReport-honors-endpoint.http.sub.html A LayoutTests/imported/w3c/web-platform-tests/reporting/generateTestReport-honors-endpoint.http.sub.html.sub.headers A LayoutTests/imported/w3c/web-platform-tests/reporting/generateTestReport-honors-endpoint.https.sub-expected.txt A LayoutTests/imported/w3c/web-platform-tests/reporting/generateTestReport-honors-endpoint.https.sub.html A LayoutTests/imported/w3c/web-platform-tests/reporting/generateTestReport-honors-endpoint.https.sub.html.sub.headers M LayoutTests/platform/gtk/TestExpectations M LayoutTests/platform/mac-wk1/TestExpectations M LayoutTests/platform/mac-wk1/http/tests/security/contentSecurityPolicy/1.1/frame-ancestors/report-frame-ancestors-cross-origin-expected.txt M LayoutTests/platform/mac-wk1/http/tests/security/contentSecurityPolicy/1.1/frame-ancestors/report-frame-ancestors-cross-origin-https-expected.txt M LayoutTests/platform/mac-wk1/http/tests/security/contentSecurityPolicy/1.1/frame-ancestors/report-frame-ancestors-same-origin-expected.txt M LayoutTests/platform/mac-wk1/http/tests/security/contentSecurityPolicy/1.1/frame-ancestors/report-frame-ancestors-same-origin-https-expected.txt M LayoutTests/platform/win/http/tests/security/contentSecurityPolicy/1.1/frame-ancestors/report-frame-ancestors-cross-origin-expected.txt M LayoutTests/platform/win/http/tests/security/contentSecurityPolicy/1.1/frame-ancestors/report-frame-ancestors-same-origin-expected.txt M Source/WebCore/Modules/reporting/Report.cpp M Source/WebCore/Modules/reporting/Report.h M Source/WebCore/Modules/reporting/ReportingScope.cpp M Source/WebCore/Modules/reporting/TestReportBody.cpp M Source/WebCore/Modules/reporting/TestReportBody.h M Source/WebCore/dom/Document.h M Source/WebCore/loader/CrossOriginEmbedderPolicy.cpp M Source/WebCore/loader/CrossOriginOpenerPolicy.cpp M Source/WebCore/page/csp/CSPViolationReportBody.cpp M Source/WebKitLegacy/mac/WebView/WebFrame.mm M Source/WebKitLegacy/mac/WebView/WebFramePrivate.h M Tools/DumpRenderTree/TestRunner.cpp M Tools/DumpRenderTree/TestRunner.h M Tools/DumpRenderTree/mac/TestRunnerMac.mm M Tools/DumpRenderTree/win/TestRunnerWin.cpp Log Message: ----------- [Reporting API] Test reports should go "Reporting-Endpoints" Endpoints https://bugs.webkit.org/show_bug.cgi?id=244907 <rdar://problem/99666423> Reviewed by Chris Dumez. Test reports should be sent to any endpoints provided in a "Reporting-Endpoints" header. There also don't appear to be WPT that check this behavior. This patch implements this part of the spec, and adds tests. It also connects 'generateTestReport' to WebKitLegacy so we can exercise the code in DumpRenderTree. * LayoutTests/http/tests/security/contentSecurityPolicy: Rebasedlined tests. * LayoutTests/imported/w3c/web-platform-tests/reporting/generateTestReport-honors-endpoint.https.sub-expected.txt: Added. * LayoutTests/imported/w3c/web-platform-tests/reporting/generateTestReport-honors-endpoint.https.sub.html: Added. * LayoutTests/imported/w3c/web-platform-tests/reporting/generateTestReport-honors-endpoint.https.sub.html.sub.headers: Added. * LayoutTests/imported/w3c/web-platform-tests/reporting/generateTestReport-honors-endpoint.http.sub-expected: Added. * LayoutTests/imported/w3c/web-platform-tests/reporting/generateTestReport-honors-endpoint.http.sub.html: Added. * LayoutTests/imported/w3c/web-platform-tests/reporting/generateTestReport-honors-endpoint.http.sub.html.sub.headers: Added. * LayoutTests/platform/gtk/TestExpectations: Mark http-based WPT as expected to fail. * LayoutTests/platform/mac-wk1/TestExpectations: Mark https-based WPT as expected to fail. * Source/WebCore/Modules/reporting/Report.cpp: (WebCore::Report::createReportFormDataForViolation): * Source/WebCore/Modules/reporting/Report.h: * Source/WebCore/Modules/reporting/ReportingScope.cpp: (WebCore::ReportingScope::generateTestReport): * Source/WebCore/Modules/reporting/TestReportBody.cpp: (WebCore::TestReportBody::createReportFormDataForViolation const): Deleted. * Source/WebCore/Modules/reporting/TestReportBody.h: * Source/WebCore/loader/CrossOriginEmbedderPolicy.cpp: (WebCore::sendCOEPInheritenceViolation): (WebCore::sendCOEPCORPViolation): * Source/WebCore/loader/CrossOriginOpenerPolicy.cpp: (WebCore::sendViolationReportWhenNavigatingToCOOPResponse): (WebCore::sendViolationReportWhenNavigatingAwayFromCOOPResponse): * Source/WebCore/page/csp/CSPViolationReportBody.cpp: (WebCore::CSPViolationReportBody::createReportFormDataForViolation const): * Source/WebCore/page/csp/CSPViolationReportBody.h: * Source/WebCore/page/csp/ContentSecurityPolicy.cpp: (WebCore::ContentSecurityPolicy::reportViolation const): * Source/WebKitLegacy/mac/WebView/WebFrame.mm (-[WebFrame _generateTestReport:withGroup:]): Added. * Source/WebKitLegacy/mac/WebView/WebFramePrivate.h * Tools/DumpRenderTree/TestRunner.cpp (generateTestReportCallback): Add support for 'generateTestReport'. (TestRunner::staticFunctions): Ditto. * Tools/DumpRenderTree/TestRunner.h * Tools/DumpRenderTree/mac/TestRunnerMac.mm (TestRunner::generateTestReport): Added. * Tools/DumpRenderTree/win/TestRunnerWin.cpp (TestRunner::generateTestReport): Added stub. Canonical link: https://commits.webkit.org/255845@main _______________________________________________ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes