Changeset 282305 in webkit
- Timestamp:
- Sep 10, 2021 7:51:32 PM (10 months ago)
- Location:
- trunk
- Files:
-
- 2 added
- 46 edited
-
LayoutTests/ChangeLog (modified) (1 diff)
-
LayoutTests/TestExpectations (modified) (2 diffs)
-
LayoutTests/imported/w3c/ChangeLog (modified) (1 diff)
-
LayoutTests/imported/w3c/web-platform-tests/html/cross-origin-opener-policy/reporting/navigation-reporting/report-only-four-reports.https-expected.txt (modified) (1 diff)
-
LayoutTests/imported/w3c/web-platform-tests/html/cross-origin-opener-policy/reporting/navigation-reporting/report-only-four-reports.https.html.sub.headers (modified) (1 diff)
-
LayoutTests/imported/w3c/web-platform-tests/html/cross-origin-opener-policy/reporting/navigation-reporting/report-only-from-unsafe-none.https-expected.txt (modified) (1 diff)
-
LayoutTests/imported/w3c/web-platform-tests/html/cross-origin-opener-policy/reporting/navigation-reporting/report-only-same-origin-report-to.https-expected.txt (modified) (1 diff)
-
LayoutTests/imported/w3c/web-platform-tests/html/cross-origin-opener-policy/reporting/navigation-reporting/report-only-same-origin-report-to.https.html.sub.headers (modified) (1 diff)
-
LayoutTests/imported/w3c/web-platform-tests/html/cross-origin-opener-policy/reporting/navigation-reporting/report-only-same-origin.https-expected.txt (modified) (1 diff)
-
LayoutTests/imported/w3c/web-platform-tests/html/cross-origin-opener-policy/reporting/navigation-reporting/reporting-coop-navigated-opener.https-expected.txt (modified) (1 diff)
-
LayoutTests/imported/w3c/web-platform-tests/html/cross-origin-opener-policy/reporting/navigation-reporting/reporting-coop-navigated-popup.https-expected.txt (modified) (1 diff)
-
LayoutTests/imported/w3c/web-platform-tests/html/cross-origin-opener-policy/reporting/navigation-reporting/reporting-popup-same-origin-allow-popups-report-to.https-expected.txt (modified) (1 diff)
-
LayoutTests/imported/w3c/web-platform-tests/html/cross-origin-opener-policy/reporting/navigation-reporting/reporting-popup-same-origin-allow-popups-report-to.https.html.sub.headers (modified) (1 diff)
-
LayoutTests/imported/w3c/web-platform-tests/html/cross-origin-opener-policy/reporting/navigation-reporting/reporting-popup-same-origin-coep-report-to.https-expected.txt (modified) (1 diff)
-
LayoutTests/imported/w3c/web-platform-tests/html/cross-origin-opener-policy/reporting/navigation-reporting/reporting-popup-same-origin-coep-report-to.https.html.sub.headers (modified) (1 diff)
-
LayoutTests/imported/w3c/web-platform-tests/html/cross-origin-opener-policy/reporting/navigation-reporting/reporting-popup-same-origin-report-to.https-expected.txt (modified) (1 diff)
-
LayoutTests/imported/w3c/web-platform-tests/html/cross-origin-opener-policy/reporting/navigation-reporting/reporting-popup-same-origin-report-to.https.html.sub.headers (modified) (1 diff)
-
LayoutTests/imported/w3c/web-platform-tests/html/cross-origin-opener-policy/reporting/navigation-reporting/reporting-popup-same-origin.https-expected.txt (modified) (1 diff)
-
LayoutTests/imported/w3c/web-platform-tests/html/cross-origin-opener-policy/reporting/navigation-reporting/reporting-popup-unsafe-none-report-to.https-expected.txt (modified) (1 diff)
-
LayoutTests/imported/w3c/web-platform-tests/html/cross-origin-opener-policy/reporting/navigation-reporting/reporting-popup-unsafe-none-report-to.https.html.sub.headers (modified) (1 diff)
-
LayoutTests/imported/w3c/web-platform-tests/html/cross-origin-opener-policy/reporting/navigation-reporting/reporting-redirect-with-same-origin-allow-popups.https-expected.txt (modified) (1 diff)
-
LayoutTests/imported/w3c/web-platform-tests/html/cross-origin-opener-policy/reporting/resources/reporting-common.js (modified) (1 diff)
-
Source/WebCore/ChangeLog (modified) (1 diff)
-
Source/WebCore/Headers.cmake (modified) (1 diff)
-
Source/WebCore/Sources.txt (modified) (1 diff)
-
Source/WebCore/WebCore.xcodeproj/project.pbxproj (modified) (4 diffs)
-
Source/WebCore/loader/CrossOriginOpenerPolicy.cpp (modified) (3 diffs)
-
Source/WebCore/loader/CrossOriginOpenerPolicy.h (modified) (1 diff)
-
Source/WebCore/loader/DocumentLoader.cpp (modified) (6 diffs)
-
Source/WebCore/loader/PingLoader.cpp (modified) (4 diffs)
-
Source/WebCore/loader/PingLoader.h (modified) (2 diffs)
-
Source/WebCore/loader/ReportingEndpointsCache.cpp (added)
-
Source/WebCore/loader/ReportingEndpointsCache.h (added)
-
Source/WebCore/loader/WorkerThreadableLoader.cpp (modified) (1 diff)
-
Source/WebCore/loader/cache/CachedResourceLoader.cpp (modified) (1 diff)
-
Source/WebCore/page/Page.cpp (modified) (2 diffs)
-
Source/WebCore/page/Page.h (modified) (3 diffs)
-
Source/WebCore/page/PageConfiguration.cpp (modified) (1 diff)
-
Source/WebCore/page/PageConfiguration.h (modified) (2 diffs)
-
Source/WebCore/platform/network/HTTPHeaderNames.in (modified) (1 diff)
-
Source/WebKit/ChangeLog (modified) (1 diff)
-
Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.cpp (modified) (1 diff)
-
Source/WebKit/NetworkProcess/NetworkSession.cpp (modified) (1 diff)
-
Source/WebKit/WebProcess/WebPage/WebPage.cpp (modified) (2 diffs)
-
Source/WebKit/WebProcess/WebProcess.cpp (modified) (2 diffs)
-
Source/WebKit/WebProcess/WebProcess.h (modified) (3 diffs)
-
Tools/ChangeLog (modified) (1 diff)
-
Tools/WebKitTestRunner/InjectedBundle/InjectedBundle.cpp (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r282299 r282305 1 2021-09-10 Chris Dumez <cdumez@apple.com> 2 3 Implement navigation reporting for Cross-Origin-Opener-Policy 4 https://bugs.webkit.org/show_bug.cgi?id=230046 5 6 Reviewed by Alex Christensen. 7 8 Unskip COOP navigation reporting tests. 9 10 * TestExpectations: 11 1 12 2021-09-10 Eric Hutchison <ehutchison@apple.com> 2 13 -
trunk/LayoutTests/TestExpectations
r282287 r282305 411 411 imported/w3c/web-platform-tests/html/cross-origin-opener-policy/navigate-top-to-aboutblank.https.html [ DumpJSConsoleLogInStdErr ] 412 412 imported/w3c/web-platform-tests/html/cross-origin-opener-policy/popup-coop-by-sw.https.html [ DumpJSConsoleLogInStdErr ] 413 imported/w3c/web-platform-tests/html/cross-origin-opener-policy/reporting/navigation-reporting/reporting-coop-navigated-opener.https.html [ DumpJSConsoleLogInStdErr ] 414 imported/w3c/web-platform-tests/html/cross-origin-opener-policy/reporting/navigation-reporting/reporting-coop-navigated-popup.https.html [ DumpJSConsoleLogInStdErr ] 413 415 imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe-network-error.sub.html [ DumpJSConsoleLogInStdErr ] 414 416 imported/w3c/web-platform-tests/html/semantics/scripting-1/the-script-element/css-module/integrity.html [ DumpJSConsoleLogInStdErr ] … … 718 720 imported/w3c/web-platform-tests/html/rendering/non-replaced-elements/phrasing-content-0/font-element-text-decoration-color/001-x.xhtml [ ImageOnlyFailure ] 719 721 720 # Cross-Origin Opener Policy reporting is not supported and it is causing those tests to time out.721 imported/w3c/web-platform-tests/html/cross-origin-opener-policy/reporting [ Skip ]722 # Cross-Origin Opener Policy access reporting is not supported and it is causing those tests to time out. 723 imported/w3c/web-platform-tests/html/cross-origin-opener-policy/reporting/access-reporting [ Skip ] 722 724 723 725 # Cross-Origin-Embedder-Policy: credentialless is not supported. -
trunk/LayoutTests/imported/w3c/ChangeLog
r282287 r282305 1 2021-09-10 Chris Dumez <cdumez@apple.com> 2 3 Implement navigation reporting for Cross-Origin-Opener-Policy 4 https://bugs.webkit.org/show_bug.cgi?id=230046 5 6 Reviewed by Alex Christensen. 7 8 Rebaseline WPT COOP navigation reporting tests now that they are passing. 9 10 Merge the following fix to WPT tests so they can run with the WebKit infrastructure: 11 - https://github.com/web-platform-tests/wpt/pull/30411 12 13 Merge the following WPT test fix to address flakiness: 14 - https://github.com/web-platform-tests/wpt/pull/30548 15 16 * web-platform-tests/html/cross-origin-opener-policy/reporting/navigation-reporting/report-only-four-reports.https-expected.txt: 17 * web-platform-tests/html/cross-origin-opener-policy/reporting/navigation-reporting/report-only-four-reports.https.html.sub.headers: 18 * web-platform-tests/html/cross-origin-opener-policy/reporting/navigation-reporting/report-only-from-unsafe-none.https-expected.txt: 19 * web-platform-tests/html/cross-origin-opener-policy/reporting/navigation-reporting/report-only-same-origin-report-to.https-expected.txt: 20 * web-platform-tests/html/cross-origin-opener-policy/reporting/navigation-reporting/report-only-same-origin-report-to.https.html.sub.headers: 21 * web-platform-tests/html/cross-origin-opener-policy/reporting/navigation-reporting/report-only-same-origin.https-expected.txt: 22 * web-platform-tests/html/cross-origin-opener-policy/reporting/navigation-reporting/reporting-coop-navigated-opener.https-expected.txt: 23 * web-platform-tests/html/cross-origin-opener-policy/reporting/navigation-reporting/reporting-coop-navigated-popup.https-expected.txt: 24 * web-platform-tests/html/cross-origin-opener-policy/reporting/navigation-reporting/reporting-popup-same-origin-allow-popups-report-to.https-expected.txt: 25 * web-platform-tests/html/cross-origin-opener-policy/reporting/navigation-reporting/reporting-popup-same-origin-allow-popups-report-to.https.html.sub.headers: 26 * web-platform-tests/html/cross-origin-opener-policy/reporting/navigation-reporting/reporting-popup-same-origin-coep-report-to.https-expected.txt: 27 * web-platform-tests/html/cross-origin-opener-policy/reporting/navigation-reporting/reporting-popup-same-origin-coep-report-to.https.html.sub.headers: 28 * web-platform-tests/html/cross-origin-opener-policy/reporting/navigation-reporting/reporting-popup-same-origin-report-to.https-expected.txt: 29 * web-platform-tests/html/cross-origin-opener-policy/reporting/navigation-reporting/reporting-popup-same-origin-report-to.https.html.sub.headers: 30 * web-platform-tests/html/cross-origin-opener-policy/reporting/navigation-reporting/reporting-popup-same-origin.https-expected.txt: 31 * web-platform-tests/html/cross-origin-opener-policy/reporting/navigation-reporting/reporting-popup-unsafe-none-report-to.https-expected.txt: 32 * web-platform-tests/html/cross-origin-opener-policy/reporting/navigation-reporting/reporting-popup-unsafe-none-report-to.https.html.sub.headers: 33 * web-platform-tests/html/cross-origin-opener-policy/reporting/navigation-reporting/reporting-redirect-with-same-origin-allow-popups.https-expected.txt: 34 * web-platform-tests/html/cross-origin-opener-policy/reporting/resources/reporting-common.js: 35 1 36 2021-09-10 Simon Fraser <simon.fraser@apple.com> 2 37 -
trunk/LayoutTests/imported/w3c/web-platform-tests/html/cross-origin-opener-policy/reporting/navigation-reporting/report-only-four-reports.https-expected.txt
r280044 r282305 1 1 2 FAIL coop reporting test A test with both COOP and COOP report only setup to CROSS_ORIGIN with same-origin-allow-popups; report-to="coop-popup-report-endpoint", require-corp, same-origin; report-to="coop-popup-report-only-endpoint", require-corp promise_test: Unhandled rejection with value: "No report matched the expected report for endpoint: coop-report-endpoint, expected report: {\"body\":{\"disposition\":\"enforce\",\"effectivePolicy\":\"same-origin-allow-popups\",\"nextResponseURL\":\"/uuid=(uuid)$/\",\"type\":\"navigation-from-response\"},\"url\":\"https://localhost:9443/html/cross-origin-opener-policy/reporting/navigation-reporting/report-only-four-reports.https.html\",\"type\":\"coop\"}, within available reports: []" 2 PASS coop reporting test A test with both COOP and COOP report only setup to CROSS_ORIGIN with same-origin-allow-popups; report-to="coop-popup-report-endpoint", require-corp, same-origin; report-to="coop-popup-report-only-endpoint", require-corp 3 3 PASS verify remaining reports 4 4 -
trunk/LayoutTests/imported/w3c/web-platform-tests/html/cross-origin-opener-policy/reporting/navigation-reporting/report-only-four-reports.https.html.sub.headers
r279427 r282305 4 4 Cross-Origin-Embedder-Policy-Report-Only: require-corp 5 5 Referrer-Policy: origin 6 report-to: { "group": "coop-report-endpoint", "max_age": 10886400, "endpoints": [{ "url": " https://{{hosts[][www]}}:{{ports[https][0]}}/reporting/resources/report.py?endpoint=coop-report-endpoint" }] }, { "group": "coop-report-only-endpoint", "max_age": 10886400, "endpoints": [{ "url": "https://{{hosts[][www]}}:{{ports[https][0]}}/reporting/resources/report.py?endpoint=coop-report-only-endpoint" }]}6 report-to: { "group": "coop-report-endpoint", "max_age": 10886400, "endpoints": [{ "url": "/reporting/resources/report.py?endpoint=coop-report-endpoint" }] }, { "group": "coop-report-only-endpoint", "max_age": 10886400, "endpoints": [{ "url": "/reporting/resources/report.py?endpoint=coop-report-only-endpoint" }]} -
trunk/LayoutTests/imported/w3c/web-platform-tests/html/cross-origin-opener-policy/reporting/navigation-reporting/report-only-from-unsafe-none.https-expected.txt
r280044 r282305 1 1 2 FAIL coop reporting test Report only tests for an opener without any COOP/COOP report only set to SAME_ORIGIN with , , same-origin; report-to="coop-popup-report-only-endpoint", promise_test: Unhandled rejection with value: "No report matched the expected report for endpoint: coop-popup-report-only-endpoint, expected report: {\"body\":{\"disposition\":\"reporting\",\"effectivePolicy\":\"same-origin\",\"previousResponseURL\":\"https://localhost:9443/html/cross-origin-opener-policy/reporting/navigation-reporting/report-only-from-unsafe-none.https.html\",\"referrer\":\"https://localhost:9443/\",\"type\":\"navigation-to-response\"},\"url\":\"/uuid=(uuid)$/\",\"type\":\"coop\"}, within available reports: []" 3 FAIL coop reporting test Report only tests for an opener without any COOP/COOP report only set to CROSS_ORIGIN with , , same-origin; report-to="coop-popup-report-only-endpoint", promise_test: Unhandled rejection with value: "No report matched the expected report for endpoint: coop-popup-report-only-endpoint, expected report: {\"body\":{\"disposition\":\"reporting\",\"effectivePolicy\":\"same-origin\",\"previousResponseURL\":\"\",\"referrer\":\"https://localhost:9443/\",\"type\":\"navigation-to-response\"},\"url\":\"/uuid=(uuid)$/\",\"type\":\"coop\"}, within available reports: []" 2 PASS coop reporting test Report only tests for an opener without any COOP/COOP report only set to SAME_ORIGIN with , , same-origin; report-to="coop-popup-report-only-endpoint", 3 PASS coop reporting test Report only tests for an opener without any COOP/COOP report only set to CROSS_ORIGIN with , , same-origin; report-to="coop-popup-report-only-endpoint", 4 4 PASS verify remaining reports 5 5 -
trunk/LayoutTests/imported/w3c/web-platform-tests/html/cross-origin-opener-policy/reporting/navigation-reporting/report-only-same-origin-report-to.https-expected.txt
r280044 r282305 1 1 2 FAIL coop reporting test reporting same origin with report-to to CROSS_ORIGIN with , , , promise_test: Unhandled rejection with value: "No report matched the expected report for endpoint: coop-report-only-endpoint, expected report: {\"body\":{\"disposition\":\"reporting\",\"effectivePolicy\":\"same-origin\",\"nextResponseURL\":\"/uuid=(uuid)$/\",\"type\":\"navigation-from-response\"},\"url\":\"https://localhost:9443/html/cross-origin-opener-policy/reporting/navigation-reporting/report-only-same-origin-report-to.https.html\",\"type\":\"coop\"}, within available reports: []" 3 FAIL coop reporting test reporting same origin with report-to to CROSS_ORIGIN with , , same-origin; report-to="coop-popup-report-only-endpoint", promise_test: Unhandled rejection with value: "No report matched the expected report for endpoint: coop-report-only-endpoint, expected report: {\"body\":{\"disposition\":\"reporting\",\"effectivePolicy\":\"same-origin\",\"nextResponseURL\":\"/uuid=(uuid)$/\",\"type\":\"navigation-from-response\"},\"url\":\"https://localhost:9443/html/cross-origin-opener-policy/reporting/navigation-reporting/report-only-same-origin-report-to.https.html\",\"type\":\"coop\"}, within available reports: []" 2 PASS coop reporting test reporting same origin with report-to to CROSS_ORIGIN with , , , 3 PASS coop reporting test reporting same origin with report-to to CROSS_ORIGIN with , , same-origin; report-to="coop-popup-report-only-endpoint", 4 4 PASS coop reporting test reporting same origin with report-to to SAME_ORIGIN with , , same-origin; report-to="coop-popup-report-only-endpoint", 5 5 PASS verify remaining reports -
trunk/LayoutTests/imported/w3c/web-platform-tests/html/cross-origin-opener-policy/reporting/navigation-reporting/report-only-same-origin-report-to.https.html.sub.headers
r279427 r282305 1 1 Cross-Origin-Opener-Policy-Report-Only: same-origin; report-to="coop-report-only-endpoint" 2 2 Referrer-Policy: origin 3 report-to: { "group": "coop-report-endpoint", "max_age": 10886400, "endpoints": [{ "url": " https://{{hosts[][www]}}:{{ports[https][0]}}/reporting/resources/report.py?endpoint=coop-report-endpoint" }] }, { "group": "coop-report-only-endpoint", "max_age": 10886400, "endpoints": [{ "url": "https://{{hosts[][www]}}:{{ports[https][0]}}/reporting/resources/report.py?endpoint=coop-report-only-endpoint" }]}3 report-to: { "group": "coop-report-endpoint", "max_age": 10886400, "endpoints": [{ "url": "/reporting/resources/report.py?endpoint=coop-report-endpoint" }] }, { "group": "coop-report-only-endpoint", "max_age": 10886400, "endpoints": [{ "url": "/reporting/resources/report.py?endpoint=coop-report-only-endpoint" }]} -
trunk/LayoutTests/imported/w3c/web-platform-tests/html/cross-origin-opener-policy/reporting/navigation-reporting/report-only-same-origin.https-expected.txt
r280044 r282305 1 1 2 FAIL coop reporting test reporting same origin with report-to to SAME_ORIGIN with , require-corp, same-origin; report-to="coop-popup-report-only-endpoint", promise_test: Unhandled rejection with value: "No report matched the expected report for endpoint: coop-popup-report-only-endpoint, expected report: {\"body\":{\"disposition\":\"reporting\",\"effectivePolicy\":\"same-origin-plus-coep\",\"previousResponseURL\":\"https://localhost:9443/html/cross-origin-opener-policy/reporting/navigation-reporting/report-only-same-origin.https.html\",\"referrer\":\"https://localhost:9443/\",\"type\":\"navigation-to-response\"},\"url\":\"/uuid=(uuid)$/\",\"type\":\"coop\"}, within available reports: []" 3 FAIL coop reporting test reporting same origin with report-to to SAME_ORIGIN with , , same-origin; report-to="coop-popup-report-only-endpoint", require-corp promise_test: Unhandled rejection with value: "No report matched the expected report for endpoint: coop-popup-report-only-endpoint, expected report: {\"body\":{\"disposition\":\"reporting\",\"effectivePolicy\":\"same-origin-plus-coep\",\"previousResponseURL\":\"https://localhost:9443/html/cross-origin-opener-policy/reporting/navigation-reporting/report-only-same-origin.https.html\",\"referrer\":\"https://localhost:9443/\",\"type\":\"navigation-to-response\"},\"url\":\"/uuid=(uuid)$/\",\"type\":\"coop\"}, within available reports: []" 2 PASS coop reporting test reporting same origin with report-to to SAME_ORIGIN with , require-corp, same-origin; report-to="coop-popup-report-only-endpoint", 3 PASS coop reporting test reporting same origin with report-to to SAME_ORIGIN with , , same-origin; report-to="coop-popup-report-only-endpoint", require-corp 4 4 PASS verify remaining reports 5 5 -
trunk/LayoutTests/imported/w3c/web-platform-tests/html/cross-origin-opener-policy/reporting/navigation-reporting/reporting-coop-navigated-opener.https-expected.txt
r280044 r282305 1 CONSOLE MESSAGE: Unhandled Promise Rejection: TypeError: cancelled2 1 3 Harness Error (TIMEOUT), message = null 2 PASS navigation-report-from-opener-navigation 4 3 5 TIMEOUT navigation-report-from-opener-navigation Test timed out6 -
trunk/LayoutTests/imported/w3c/web-platform-tests/html/cross-origin-opener-policy/reporting/navigation-reporting/reporting-coop-navigated-popup.https-expected.txt
r280044 r282305 1 1 2 FAIL Open a popup to a document without COOP, then navigate it to a document with promise_test: Unhandled rejection with value: "No report matched the expected report for endpoint: coop-popup-report-endpoint, expected report: {\"body\":{\"disposition\":\"enforce\",\"effectivePolicy\":\"unsafe-none\",\"nextResponseURL\":\"/uuid=(uuid)$/\",\"type\":\"navigation-from-response\"},\"url\":\"/uuid=(uuid)$/\",\"type\":\"coop\"}, within available reports: []" 2 PASS Open a popup to a document without COOP, then navigate it to a document with 3 3 PASS verify remaining reports 4 4 -
trunk/LayoutTests/imported/w3c/web-platform-tests/html/cross-origin-opener-policy/reporting/navigation-reporting/reporting-popup-same-origin-allow-popups-report-to.https-expected.txt
r280044 r282305 1 1 2 FAIL coop reporting test reporting same origin with report-to to SAME_ORIGIN with same-origin; report-to="coop-popup-report-endpoint", , , promise_test: Unhandled rejection with value: "No report matched the expected report for endpoint: coop-report-endpoint, expected report: {\"body\":{\"disposition\":\"enforce\",\"effectivePolicy\":\"same-origin-allow-popups\",\"nextResponseURL\":\"/uuid=(uuid)$/\",\"type\":\"navigation-from-response\"},\"url\":\"https://localhost:9443/html/cross-origin-opener-policy/reporting/navigation-reporting/reporting-popup-same-origin-allow-popups-report-to.https.html\",\"type\":\"coop\"}, within available reports: []" 3 FAIL coop reporting test reporting same origin with report-to to CROSS_ORIGIN with same-origin-allow-popups; report-to="coop-popup-report-endpoint", require-corp, , promise_test: Unhandled rejection with value: "No report matched the expected report for endpoint: coop-report-endpoint, expected report: {\"body\":{\"disposition\":\"enforce\",\"effectivePolicy\":\"same-origin-allow-popups\",\"nextResponseURL\":\"/uuid=(uuid)$/\",\"type\":\"navigation-from-response\"},\"url\":\"https://localhost:9443/html/cross-origin-opener-policy/reporting/navigation-reporting/reporting-popup-same-origin-allow-popups-report-to.https.html\",\"type\":\"coop\"}, within available reports: []" 4 FAIL coop reporting test reporting same origin with report-to to CROSS_ORIGIN with same-origin, require-corp, , promise_test: Unhandled rejection with value: "No report matched the expected report for endpoint: coop-report-endpoint, expected report: {\"body\":{\"disposition\":\"enforce\",\"effectivePolicy\":\"same-origin-allow-popups\",\"nextResponseURL\":\"/uuid=(uuid)$/\",\"type\":\"navigation-from-response\"},\"url\":\"https://localhost:9443/html/cross-origin-opener-policy/reporting/navigation-reporting/reporting-popup-same-origin-allow-popups-report-to.https.html\",\"type\":\"coop\"}, within available reports: []" 2 PASS coop reporting test reporting same origin with report-to to SAME_ORIGIN with same-origin; report-to="coop-popup-report-endpoint", , , 3 PASS coop reporting test reporting same origin with report-to to CROSS_ORIGIN with same-origin-allow-popups; report-to="coop-popup-report-endpoint", require-corp, , 4 PASS coop reporting test reporting same origin with report-to to CROSS_ORIGIN with same-origin, require-corp, , 5 5 PASS verify remaining reports 6 6 -
trunk/LayoutTests/imported/w3c/web-platform-tests/html/cross-origin-opener-policy/reporting/navigation-reporting/reporting-popup-same-origin-allow-popups-report-to.https.html.sub.headers
r279427 r282305 1 report-to: { "group": "coop-report-endpoint", "max_age": 10886400, "endpoints": [{ "url": " https://{{hosts[][www]}}:{{ports[https][0]}}/reporting/resources/report.py?endpoint=coop-report-endpoint" }] }, { "group": "coop-report-only-endpoint", "max_age": 10886400, "endpoints": [{ "url": "https://{{hosts[][www]}}:{{ports[https][0]}}/reporting/resources/report.py?endpoint=coop-report-only-endpoint" }]}1 report-to: { "group": "coop-report-endpoint", "max_age": 10886400, "endpoints": [{ "url": "/reporting/resources/report.py?endpoint=coop-report-endpoint" }] }, { "group": "coop-report-only-endpoint", "max_age": 10886400, "endpoints": [{ "url": "/reporting/resources/report.py?endpoint=coop-report-only-endpoint" }]} 2 2 Cross-Origin-Opener-Policy: same-origin-allow-popups; report-to="coop-report-endpoint" 3 3 Referrer-Policy: origin -
trunk/LayoutTests/imported/w3c/web-platform-tests/html/cross-origin-opener-policy/reporting/navigation-reporting/reporting-popup-same-origin-coep-report-to.https-expected.txt
r280044 r282305 2 2 3 3 PASS coop reporting test reporting same origin with report-to to SAME_ORIGIN with same-origin; report-to="coop-popup-report-endpoint", require-corp, , 4 FAIL coop reporting test reporting same origin with report-to to SAME_ORIGIN with same-origin; report-to="coop-popup-report-endpoint", , , promise_test: Unhandled rejection with value: "No report matched the expected report for endpoint: coop-report-endpoint, expected report: {\"body\":{\"disposition\":\"enforce\",\"effectivePolicy\":\"same-origin-plus-coep\",\"nextResponseURL\":\"/uuid=(uuid)$/\",\"type\":\"navigation-from-response\"},\"url\":\"https://localhost:9443/html/cross-origin-opener-policy/reporting/navigation-reporting/reporting-popup-same-origin-coep-report-to.https.html\",\"type\":\"coop\"}, within available reports: []" 5 FAIL coop reporting test reporting same origin with report-to to CROSS_ORIGIN with same-origin; report-to="coop-popup-report-endpoint", require-corp, , promise_test: Unhandled rejection with value: "No report matched the expected report for endpoint: coop-report-endpoint, expected report: {\"body\":{\"disposition\":\"enforce\",\"effectivePolicy\":\"same-origin-plus-coep\",\"nextResponseURL\":\"/uuid=(uuid)$/\",\"type\":\"navigation-from-response\"},\"url\":\"https://localhost:9443/html/cross-origin-opener-policy/reporting/navigation-reporting/reporting-popup-same-origin-coep-report-to.https.html\",\"type\":\"coop\"}, within available reports: []" 6 FAIL coop reporting test reporting same origin with report-to to SAME_ORIGIN with , , same-origin; report-to="coop-popup-report-only-endpoint", require-corp promise_test: Unhandled rejection with value: "No report matched the expected report for endpoint: coop-report-endpoint, expected report: {\"body\":{\"disposition\":\"enforce\",\"effectivePolicy\":\"same-origin-plus-coep\",\"nextResponseURL\":\"/uuid=(uuid)$/\",\"type\":\"navigation-from-response\"},\"url\":\"https://localhost:9443/html/cross-origin-opener-policy/reporting/navigation-reporting/reporting-popup-same-origin-coep-report-to.https.html\",\"type\":\"coop\"}, within available reports: []" 7 FAIL coop reporting test reporting same origin with report-to to CROSS_ORIGIN with , , same-origin; report-to="coop-popup-report-only-endpoint", require-corp promise_test: Unhandled rejection with value: "No report matched the expected report for endpoint: coop-report-endpoint, expected report: {\"body\":{\"disposition\":\"enforce\",\"effectivePolicy\":\"same-origin-plus-coep\",\"nextResponseURL\":\"/uuid=(uuid)$/\",\"type\":\"navigation-from-response\"},\"url\":\"https://localhost:9443/html/cross-origin-opener-policy/reporting/navigation-reporting/reporting-popup-same-origin-coep-report-to.https.html\",\"type\":\"coop\"}, within available reports: []" 4 PASS coop reporting test reporting same origin with report-to to SAME_ORIGIN with same-origin; report-to="coop-popup-report-endpoint", , , 5 PASS coop reporting test reporting same origin with report-to to CROSS_ORIGIN with same-origin; report-to="coop-popup-report-endpoint", require-corp, , 6 PASS coop reporting test reporting same origin with report-to to SAME_ORIGIN with , , same-origin; report-to="coop-popup-report-only-endpoint", require-corp 7 PASS coop reporting test reporting same origin with report-to to CROSS_ORIGIN with , , same-origin; report-to="coop-popup-report-only-endpoint", require-corp 8 8 PASS verify remaining reports 9 9 -
trunk/LayoutTests/imported/w3c/web-platform-tests/html/cross-origin-opener-policy/reporting/navigation-reporting/reporting-popup-same-origin-coep-report-to.https.html.sub.headers
r279427 r282305 1 report-to: { "group": "coop-report-endpoint", "max_age": 10886400, "endpoints": [{ "url": " https://{{hosts[][www]}}:{{ports[https][0]}}/reporting/resources/report.py?endpoint=coop-report-endpoint" }] }, { "group": "coop-report-only-endpoint", "max_age": 10886400, "endpoints": [{ "url": "https://{{hosts[][www]}}:{{ports[https][0]}}/reporting/resources/report.py?endpoint=coop-report-only-endpoint" }]}1 report-to: { "group": "coop-report-endpoint", "max_age": 10886400, "endpoints": [{ "url": "/reporting/resources/report.py?endpoint=coop-report-endpoint" }] }, { "group": "coop-report-only-endpoint", "max_age": 10886400, "endpoints": [{ "url": "/reporting/resources/report.py?endpoint=coop-report-only-endpoint" }]} 2 2 Cross-Origin-Opener-Policy: same-origin; report-to="coop-report-endpoint" 3 3 Cross-Origin-Embedder-Policy: require-corp -
trunk/LayoutTests/imported/w3c/web-platform-tests/html/cross-origin-opener-policy/reporting/navigation-reporting/reporting-popup-same-origin-report-to.https-expected.txt
r280044 r282305 1 1 2 2 PASS coop reporting test reporting same origin with report-to to SAME_ORIGIN with same-origin; report-to="coop-popup-report-endpoint", , , 3 FAIL coop reporting test reporting same origin with report-to to CROSS_ORIGIN with same-origin; report-to="coop-popup-report-endpoint", , , promise_test: Unhandled rejection with value: "No report matched the expected report for endpoint: coop-report-endpoint, expected report: {\"body\":{\"disposition\":\"enforce\",\"effectivePolicy\":\"same-origin\",\"nextResponseURL\":\"/uuid=(uuid)$/\",\"type\":\"navigation-from-response\"},\"url\":\"https://localhost:9443/html/cross-origin-opener-policy/reporting/navigation-reporting/reporting-popup-same-origin-report-to.https.html\",\"type\":\"coop\"}, within available reports: []" 4 FAIL coop reporting test reporting same origin with report-to to SAME_ORIGIN with unsafe-none; report-to="coop-popup-report-endpoint", , , promise_test: Unhandled rejection with value: "No report matched the expected report for endpoint: coop-report-endpoint, expected report: {\"body\":{\"disposition\":\"enforce\",\"effectivePolicy\":\"same-origin\",\"nextResponseURL\":\"/uuid=(uuid)$/\",\"type\":\"navigation-from-response\"},\"url\":\"https://localhost:9443/html/cross-origin-opener-policy/reporting/navigation-reporting/reporting-popup-same-origin-report-to.https.html\",\"type\":\"coop\"}, within available reports: []" 5 FAIL coop reporting test reporting same origin with report-to to SAME_ORIGIN with same-origin; report-to="coop-popup-report-endpoint", require-corp, , promise_test: Unhandled rejection with value: "No report matched the expected report for endpoint: coop-report-endpoint, expected report: {\"body\":{\"disposition\":\"enforce\",\"effectivePolicy\":\"same-origin\",\"nextResponseURL\":\"/uuid=(uuid)$/\",\"type\":\"navigation-from-response\"},\"url\":\"https://localhost:9443/html/cross-origin-opener-policy/reporting/navigation-reporting/reporting-popup-same-origin-report-to.https.html\",\"type\":\"coop\"}, within available reports: []" 6 FAIL coop reporting test reporting same origin with report-to to CROSS_ORIGIN with unsafe-none; report-to="coop-popup-report-endpoint", , , promise_test: Unhandled rejection with value: "No report matched the expected report for endpoint: coop-report-endpoint, expected report: {\"body\":{\"disposition\":\"enforce\",\"effectivePolicy\":\"same-origin\",\"nextResponseURL\":\"/uuid=(uuid)$/\",\"type\":\"navigation-from-response\"},\"url\":\"https://localhost:9443/html/cross-origin-opener-policy/reporting/navigation-reporting/reporting-popup-same-origin-report-to.https.html\",\"type\":\"coop\"}, within available reports: []" 7 FAIL coop reporting test reporting same origin with report-to to SAME_ORIGIN with unsafe-none, , , promise_test: Unhandled rejection with value: "No report matched the expected report for endpoint: coop-report-endpoint, expected report: {\"body\":{\"disposition\":\"enforce\",\"effectivePolicy\":\"same-origin\",\"nextResponseURL\":\"/uuid=(uuid)$/\",\"type\":\"navigation-from-response\"},\"url\":\"https://localhost:9443/html/cross-origin-opener-policy/reporting/navigation-reporting/reporting-popup-same-origin-report-to.https.html\",\"type\":\"coop\"}, within available reports: []" 3 PASS coop reporting test reporting same origin with report-to to CROSS_ORIGIN with same-origin; report-to="coop-popup-report-endpoint", , , 4 PASS coop reporting test reporting same origin with report-to to SAME_ORIGIN with unsafe-none; report-to="coop-popup-report-endpoint", , , 5 PASS coop reporting test reporting same origin with report-to to SAME_ORIGIN with same-origin; report-to="coop-popup-report-endpoint", require-corp, , 6 PASS coop reporting test reporting same origin with report-to to CROSS_ORIGIN with unsafe-none; report-to="coop-popup-report-endpoint", , , 7 PASS coop reporting test reporting same origin with report-to to SAME_ORIGIN with unsafe-none, , , 8 8 PASS verify remaining reports 9 9 -
trunk/LayoutTests/imported/w3c/web-platform-tests/html/cross-origin-opener-policy/reporting/navigation-reporting/reporting-popup-same-origin-report-to.https.html.sub.headers
r279427 r282305 1 report-to: { "group": "coop-report-endpoint", "max_age": 10886400, "endpoints": [{ "url": " https://{{hosts[][www]}}:{{ports[https][0]}}/reporting/resources/report.py?endpoint=coop-report-endpoint" }] }, { "group": "coop-report-only-endpoint", "max_age": 10886400, "endpoints": [{ "url": "https://{{hosts[][www]}}:{{ports[https][0]}}/reporting/resources/report.py?endpoint=coop-report-only-endpoint" }]}1 report-to: { "group": "coop-report-endpoint", "max_age": 10886400, "endpoints": [{ "url": "/reporting/resources/report.py?endpoint=coop-report-endpoint" }] }, { "group": "coop-report-only-endpoint", "max_age": 10886400, "endpoints": [{ "url": "/reporting/resources/report.py?endpoint=coop-report-only-endpoint" }]} 2 2 Cross-Origin-Opener-Policy: same-origin; report-to="coop-report-endpoint" 3 3 Referrer-Policy: no-referrer -
trunk/LayoutTests/imported/w3c/web-platform-tests/html/cross-origin-opener-policy/reporting/navigation-reporting/reporting-popup-same-origin.https-expected.txt
r280044 r282305 1 1 2 FAIL coop reporting test reporting same origin to CROSS_ORIGIN with same-origin; report-to="coop-popup-report-endpoint", , , promise_test: Unhandled rejection with value: "No report matched the expected report for endpoint: coop-popup-report-endpoint, expected report: {\"body\":{\"disposition\":\"enforce\",\"effectivePolicy\":\"same-origin\",\"previousResponseURL\":\"\",\"referrer\":\"https://localhost:9443/\",\"type\":\"navigation-to-response\"},\"url\":\"/uuid=(uuid)$/\",\"type\":\"coop\"}, within available reports: []" 3 FAIL coop reporting test reporting same origin to SAME_ORIGIN with unsafe-none; report-to="coop-popup-report-endpoint", , , promise_test: Unhandled rejection with value: "No report matched the expected report for endpoint: coop-popup-report-endpoint, expected report: {\"body\":{\"disposition\":\"enforce\",\"effectivePolicy\":\"unsafe-none\",\"previousResponseURL\":\"https://localhost:9443/html/cross-origin-opener-policy/reporting/navigation-reporting/reporting-popup-same-origin.https.html\",\"referrer\":\"https://localhost:9443/html/cross-origin-opener-policy/reporting/navigation-reporting/reporting-popup-same-origin.https.html\",\"type\":\"navigation-to-response\"},\"url\":\"/uuid=(uuid)$/\",\"type\":\"coop\"}, within available reports: []" 4 FAIL coop reporting test reporting same origin to CROSS_ORIGIN with unsafe-none; report-to="coop-popup-report-endpoint", , , promise_test: Unhandled rejection with value: "No report matched the expected report for endpoint: coop-popup-report-endpoint, expected report: {\"body\":{\"disposition\":\"enforce\",\"previousResponseURL\":\"\",\"referrer\":\"https://localhost:9443/\",\"type\":\"navigation-to-response\"},\"url\":\"/uuid=(uuid)$/\",\"type\":\"coop\"}, within available reports: []" 2 PASS coop reporting test reporting same origin to CROSS_ORIGIN with same-origin; report-to="coop-popup-report-endpoint", , , 3 PASS coop reporting test reporting same origin to SAME_ORIGIN with unsafe-none; report-to="coop-popup-report-endpoint", , , 4 PASS coop reporting test reporting same origin to CROSS_ORIGIN with unsafe-none; report-to="coop-popup-report-endpoint", , , 5 5 PASS coop reporting test reporting same origin to SAME_ORIGIN with , , same-origin; report-to="coop-popup-report-only-endpoint", 6 6 PASS verify remaining reports -
trunk/LayoutTests/imported/w3c/web-platform-tests/html/cross-origin-opener-policy/reporting/navigation-reporting/reporting-popup-unsafe-none-report-to.https-expected.txt
r280044 r282305 1 1 2 FAIL coop reporting test reporting same origin with report-to to SAME_ORIGIN with same-origin; report-to="coop-popup-report-endpoint", , , promise_test: Unhandled rejection with value: "No report matched the expected report for endpoint: coop-report-endpoint, expected report: {\"body\":{\"disposition\":\"enforce\",\"effectivePolicy\":\"unsafe-none\",\"nextResponseURL\":\"/uuid=(uuid)$/\",\"type\":\"navigation-from-response\"},\"url\":\"https://localhost:9443/html/cross-origin-opener-policy/reporting/navigation-reporting/reporting-popup-unsafe-none-report-to.https.html\",\"type\":\"coop\"}, within available reports: []" 3 FAIL coop reporting test reporting same origin with report-to to SAME_ORIGIN with same-origin, , , promise_test: Unhandled rejection with value: "No report matched the expected report for endpoint: coop-report-endpoint, expected report: {\"body\":{\"disposition\":\"enforce\",\"effectivePolicy\":\"unsafe-none\",\"nextResponseURL\":\"/uuid=(uuid)$/\",\"type\":\"navigation-from-response\"},\"url\":\"https://localhost:9443/html/cross-origin-opener-policy/reporting/navigation-reporting/reporting-popup-unsafe-none-report-to.https.html\",\"type\":\"coop\"}, within available reports: []" 4 FAIL coop reporting test reporting same origin with report-to to CROSS_ORIGIN with same-origin; report-to="coop-popup-report-endpoint", , , promise_test: Unhandled rejection with value: "No report matched the expected report for endpoint: coop-report-endpoint, expected report: {\"body\":{\"disposition\":\"enforce\",\"effectivePolicy\":\"unsafe-none\",\"nextResponseURL\":\"/uuid=(uuid)$/\",\"type\":\"navigation-from-response\"},\"url\":\"https://localhost:9443/html/cross-origin-opener-policy/reporting/navigation-reporting/reporting-popup-unsafe-none-report-to.https.html\",\"type\":\"coop\"}, within available reports: []" 2 PASS coop reporting test reporting same origin with report-to to SAME_ORIGIN with same-origin; report-to="coop-popup-report-endpoint", , , 3 PASS coop reporting test reporting same origin with report-to to SAME_ORIGIN with same-origin, , , 4 PASS coop reporting test reporting same origin with report-to to CROSS_ORIGIN with same-origin; report-to="coop-popup-report-endpoint", , , 5 5 PASS verify remaining reports 6 6 -
trunk/LayoutTests/imported/w3c/web-platform-tests/html/cross-origin-opener-policy/reporting/navigation-reporting/reporting-popup-unsafe-none-report-to.https.html.sub.headers
r279427 r282305 1 report-to: { "group": "coop-report-endpoint", "max_age": 10886400, "endpoints": [{ "url": " https://{{hosts[][www]}}:{{ports[https][0]}}/reporting/resources/report.py?endpoint=coop-report-endpoint" }] }, { "group": "coop-report-only-endpoint", "max_age": 10886400, "endpoints": [{ "url": "https://{{hosts[][www]}}:{{ports[https][0]}}/reporting/resources/report.py?endpoint=coop-report-only-endpoint" }]}1 report-to: { "group": "coop-report-endpoint", "max_age": 10886400, "endpoints": [{ "url": "/reporting/resources/report.py?endpoint=coop-report-endpoint" }] }, { "group": "coop-report-only-endpoint", "max_age": 10886400, "endpoints": [{ "url": "/reporting/resources/report.py?endpoint=coop-report-only-endpoint" }]} 2 2 Cross-Origin-Opener-Policy: unsafe-none; report-to="coop-report-endpoint" -
trunk/LayoutTests/imported/w3c/web-platform-tests/html/cross-origin-opener-policy/reporting/navigation-reporting/reporting-redirect-with-same-origin-allow-popups.https-expected.txt
r280582 r282305 1 1 2 Harness Error (TIMEOUT), message = null 2 PASS Same origin openee redirected to same-origin with same-origin-allow-popups 3 PASS Cross origin openee redirected to same-origin with same-origin-allow-popups 3 4 4 TIMEOUT Same origin openee redirected to same-origin with same-origin-allow-popups Test timed out5 NOTRUN Cross origin openee redirected to same-origin with same-origin-allow-popups6 -
trunk/LayoutTests/imported/w3c/web-platform-tests/html/cross-origin-opener-policy/reporting/resources/reporting-common.js
r279427 r282305 73 73 expectedReport.endpoint.reports.splice(j,1); 74 74 resolve(); 75 return; 75 76 } 76 77 }; -
trunk/Source/WebCore/ChangeLog
r282304 r282305 1 2021-09-10 Chris Dumez <cdumez@apple.com> 2 3 Implement navigation reporting for Cross-Origin-Opener-Policy 4 https://bugs.webkit.org/show_bug.cgi?id=230046 5 6 Reviewed by Alex Christensen. 7 8 Implement navigation reporting for Cross-Origin-Opener-Policy as per: 9 - https://html.spec.whatwg.org/multipage/origin.html#coop-violation-navigation-to 10 - https://html.spec.whatwg.org/multipage/origin.html#coop-violation-navigation-from 11 12 With support for the Report-To HTTP header as documented here: 13 - https://www.w3.org/TR/reporting/#header 14 15 When adopting Cross-Origin-Opener-Policy or Cross-Origin-Opener-Policy-Report-Only HTTP headers, 16 developers can now specify a `report-to` directive with the name of the endpoint to report 17 COOP violations to. The mapping from endpoint name to URL is provided via teh Report-To HTTP 18 header, as is expected by the WPT tests. 19 20 No new tests, unskipped and rebaselined existing tests. 21 22 * Sources.txt: 23 * WebCore.xcodeproj/project.pbxproj: 24 * loader/CrossOriginOpenerPolicy.cpp: 25 (WebCore::sanitizeReferrerForURLReport): 26 (WebCore::crossOriginOpenerPolicyValueToString): 27 (WebCore::sendCOOPViolationReport): 28 (WebCore::sendViolationReportWhenNavigatingToCOOPResponse): 29 (WebCore::sendViolationReportWhenNavigatingAwayFromCOOPResponse): 30 * loader/CrossOriginOpenerPolicy.h: 31 * loader/DocumentLoader.cpp: 32 (WebCore::DocumentLoader::willSendRequest): 33 (WebCore::checkIfEnforcingReportOnlyCOOPWouldRequireBrowsingContextGroupSwitch): 34 (WebCore::DocumentLoader::enforceResponseCrossOriginOpenerPolicy): 35 (WebCore::DocumentLoader::responseReceived): 36 * loader/PingLoader.cpp: 37 (WebCore::PingLoader::sendViolationReport): 38 (WebCore::PingLoader::startPingLoad): 39 * loader/PingLoader.h: 40 * loader/ReportingEndpointsCache.cpp: Added. 41 (WebCore::ReportingEndpointsCache::singleton): 42 (WebCore::ReportingEndpointsCache::addEndPointsFromResponse): 43 (WebCore::ReportingEndpointsCache::addEndpointFromDictionary): 44 (WebCore::ReportingEndpointsCache::endpointURL const): 45 (WebCore::ReportingEndpointsCache::EndPoint::EndPoint): 46 (WebCore::ReportingEndpointsCache::EndPoint::hasExpired const): 47 * loader/ReportingEndpointsCache.h: Added. 48 * loader/ResourceLoaderOptions.h: 49 (WebCore::ResourceLoaderOptions::shouldOmitUserAgent): 50 (WebCore::ResourceLoaderOptions::ResourceLoaderOptions): 51 * loader/WorkerThreadableLoader.cpp: 52 * loader/cache/CachedResourceLoader.cpp: 53 (WebCore::CachedResourceLoader::updateHTTPRequestHeaders): 54 * platform/network/HTTPHeaderNames.in: 55 1 56 2021-09-10 Myles C. Maxfield <mmaxfield@apple.com> 2 57 -
trunk/Source/WebCore/Headers.cmake
r282265 r282305 832 832 loader/ProgressTracker.h 833 833 loader/ProgressTrackerClient.h 834 loader/ReportingEndpointsCache.h 834 835 loader/ResourceCryptographicDigest.h 835 836 loader/ResourceLoadInfo.h -
trunk/Source/WebCore/Sources.txt
r282278 r282305 1543 1543 loader/PolicyChecker.cpp 1544 1544 loader/ProgressTracker.cpp 1545 loader/ReportingEndpointsCache.cpp 1545 1546 loader/ResourceCryptographicDigest.cpp 1546 1547 loader/ResourceLoadInfo.cpp -
trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj
r282304 r282305 1326 1326 46D0004026A0FEB300D1BF1E /* SubmitEvent.h in Headers */ = {isa = PBXBuildFile; fileRef = 46D0003E26A0FE6F00D1BF1E /* SubmitEvent.h */; }; 1327 1327 46DBB6501AB8C96F00D9A813 /* PowerObserverMac.h in Headers */ = {isa = PBXBuildFile; fileRef = 46DBB64E1AB8C96F00D9A813 /* PowerObserverMac.h */; settings = {ATTRIBUTES = (Private, ); }; }; 1328 46DD6E1F26E7DBE7008C1F4C /* ReportingEndpointsCache.h in Headers */ = {isa = PBXBuildFile; fileRef = 46DD6E1C26E7DBE6008C1F4C /* ReportingEndpointsCache.h */; settings = {ATTRIBUTES = (Private, ); }; }; 1328 1329 46DD93D7269DE756001AFD88 /* BroadcastChannelIdentifier.h in Headers */ = {isa = PBXBuildFile; fileRef = 46DD93D5269DE74B001AFD88 /* BroadcastChannelIdentifier.h */; settings = {ATTRIBUTES = (Private, ); }; }; 1329 1330 46DE9BB5269DF93E0024C5A6 /* BroadcastChannelRegistry.h in Headers */ = {isa = PBXBuildFile; fileRef = 46DE9BB4269DF9320024C5A6 /* BroadcastChannelRegistry.h */; settings = {ATTRIBUTES = (Private, ); }; }; … … 8424 8425 46D0003F26A0FE7000D1BF1E /* SubmitEvent.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = SubmitEvent.idl; sourceTree = "<group>"; }; 8425 8426 46DBB64E1AB8C96F00D9A813 /* PowerObserverMac.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PowerObserverMac.h; sourceTree = "<group>"; }; 8427 46DD6E1C26E7DBE6008C1F4C /* ReportingEndpointsCache.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ReportingEndpointsCache.h; sourceTree = "<group>"; }; 8428 46DD6E1E26E7DBE7008C1F4C /* ReportingEndpointsCache.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ReportingEndpointsCache.cpp; sourceTree = "<group>"; }; 8426 8429 46DD93D5269DE74B001AFD88 /* BroadcastChannelIdentifier.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = BroadcastChannelIdentifier.h; sourceTree = "<group>"; }; 8427 8430 46DE9BB4269DF9320024C5A6 /* BroadcastChannelRegistry.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = BroadcastChannelRegistry.h; sourceTree = "<group>"; }; … … 27568 27571 1A2A68220B5BEDE70002A480 /* ProgressTracker.h */, 27569 27572 1ACADD781880D91C00D8B71D /* ProgressTrackerClient.h */, 27573 46DD6E1E26E7DBE7008C1F4C /* ReportingEndpointsCache.cpp */, 27574 46DD6E1C26E7DBE6008C1F4C /* ReportingEndpointsCache.h */, 27570 27575 7C2FA60F1EA95A3200A03108 /* ResourceCryptographicDigest.cpp */, 27571 27576 7C2FA6101EA95A3200A03108 /* ResourceCryptographicDigest.h */, … … 34488 34493 2DF512CE1D873E47001D6780 /* ReplaceRangeWithTextCommand.h in Headers */, 34489 34494 93309E0A099E64920056E581 /* ReplaceSelectionCommand.h in Headers */, 34495 46DD6E1F26E7DBE7008C1F4C /* ReportingEndpointsCache.h in Headers */, 34490 34496 4998AEC613F9D0EA0090B1AA /* RequestAnimationFrameCallback.h in Headers */, 34491 34497 F55B3DD01251F12D003EF269 /* ResetInputType.h in Headers */, -
trunk/Source/WebCore/loader/CrossOriginOpenerPolicy.cpp
r281935 r282305 30 30 #include "HTTPHeaderNames.h" 31 31 #include "HTTPParsers.h" 32 #include "PingLoader.h" 33 #include "ReportingEndpointsCache.h" 32 34 #include "ResourceResponse.h" 33 35 #include "ScriptExecutionContext.h" 36 #include <wtf/JSONValues.h> 34 37 35 38 namespace WebCore { 36 39 37 static String crossOriginOpenerPolicyToString(const CrossOriginOpenerPolicyValue& coop) 40 // https://html.spec.whatwg.org/multipage/origin.html#sanitize-url-report 41 static String sanitizeReferrerForURLReport(const URL& referrer) 42 { 43 URL sanitizedReferrer = referrer; 44 sanitizedReferrer.removeCredentials(); 45 sanitizedReferrer.removeFragmentIdentifier(); 46 return sanitizedReferrer.string(); 47 } 48 49 static ASCIILiteral crossOriginOpenerPolicyToString(const CrossOriginOpenerPolicyValue& coop) 38 50 { 39 51 switch (coop) { … … 43 55 case CrossOriginOpenerPolicyValue::SameOriginAllowPopups: 44 56 return "same-origin-allow-popups"_s; 57 case CrossOriginOpenerPolicyValue::UnsafeNone: 58 break; 59 } 60 return "unsafe-none"_s; 61 } 62 63 static ASCIILiteral crossOriginOpenerPolicyValueToEffectivePolicyString(CrossOriginOpenerPolicyValue coop) 64 { 65 switch (coop) { 66 case CrossOriginOpenerPolicyValue::SameOriginAllowPopups: 67 return "same-origin-allow-popups"_s; 68 case CrossOriginOpenerPolicyValue::SameOrigin: 69 return "same-origin"_s; 70 case CrossOriginOpenerPolicyValue::SameOriginPlusCOEP: 71 return "same-origin-plus-coep"_s; 45 72 case CrossOriginOpenerPolicyValue::UnsafeNone: 46 73 break; … … 110 137 } 111 138 139 // https://www.w3.org/TR/reporting/#try-delivery 140 static void sendCOOPViolationReport(Frame& frame, CrossOriginOpenerPolicy coop, COOPDisposition disposition, const URL& coopURL, const SecurityOrigin& coopOrigin, const String& userAgent, Function<void(JSON::Object&)>&& populateBody) 141 { 142 auto& reportingEndpoint = disposition == COOPDisposition::Reporting ? coop.reportOnlyReportingEndpoint : coop.reportingEndpoint; 143 if (reportingEndpoint.isEmpty()) 144 return; 145 146 auto reportingEndpointsCache = frame.page() ? frame.page()->reportingEndpointsCache() : nullptr; 147 if (!reportingEndpointsCache) 148 return; 149 auto endpointURL = reportingEndpointsCache->endpointURL(coopOrigin.data(), reportingEndpoint); 150 if (!endpointURL.isValid()) 151 return; 152 153 auto body = JSON::Object::create(); 154 body->setString("disposition"_s, disposition == COOPDisposition::Reporting ? "reporting"_s : "enforce"_s); 155 body->setString("effectivePolicy"_s, crossOriginOpenerPolicyValueToEffectivePolicyString(disposition == COOPDisposition::Reporting ? coop.reportOnlyValue : coop.value)); 156 populateBody(body); 157 158 auto reportObject = JSON::Object::create(); 159 reportObject->setString("type"_s, "coop"_s); 160 reportObject->setString("url"_s, coopURL.string()); 161 reportObject->setString("user_agent", userAgent); 162 reportObject->setInteger("age", 0); // We currently do not delay sending the reports. 163 reportObject->setObject("body"_s, WTFMove(body)); 164 165 auto reportList = JSON::Array::create(); 166 reportList->pushObject(reportObject); 167 168 auto report = FormData::create(reportList->toJSONString().utf8()); 169 PingLoader::sendViolationReport(frame, endpointURL, WTFMove(report), ViolationReportType::StandardReportingAPIViolation); 170 } 171 172 // https://html.spec.whatwg.org/multipage/origin.html#coop-violation-navigation-to 173 void sendViolationReportWhenNavigatingToCOOPResponse(Frame& frame, CrossOriginOpenerPolicy coop, COOPDisposition disposition, const URL& coopURL, const URL& previousResponseURL, const SecurityOrigin& coopOrigin, const SecurityOrigin& previousResponseOrigin, const String& referrer, const String& userAgent) 174 { 175 sendCOOPViolationReport(frame, coop, disposition, coopURL, coopOrigin, userAgent, [&](auto& body) { 176 body.setString("previousResponseURL"_s, coopOrigin.isSameOriginAs(previousResponseOrigin) ? sanitizeReferrerForURLReport(previousResponseURL) : String()); 177 body.setString("type"_s, "navigation-to-response"_s); 178 body.setString("referrer"_s, referrer); 179 }); 180 } 181 182 // https://html.spec.whatwg.org/multipage/origin.html#coop-violation-navigation-from 183 void sendViolationReportWhenNavigatingAwayFromCOOPResponse(Frame& frame, CrossOriginOpenerPolicy coop, COOPDisposition disposition, const URL& coopURL, const URL& nextResponseURL, const SecurityOrigin& coopOrigin, const SecurityOrigin& nextResponseOrigin, bool isCOOPResponseNavigationSource, const String& userAgent) 184 { 185 sendCOOPViolationReport(frame, coop, disposition, coopURL, coopOrigin, userAgent, [&](auto& body) { 186 body.setString("nextResponseURL"_s, coopOrigin.isSameOriginAs(nextResponseOrigin) || isCOOPResponseNavigationSource ? sanitizeReferrerForURLReport(nextResponseURL) : String()); 187 body.setString("type"_s, "navigation-from-response"_s); 188 }); 189 } 190 112 191 } // namespace WebCore -
trunk/Source/WebCore/loader/CrossOriginOpenerPolicy.h
r280881 r282305 107 107 }; 108 108 109 enum class COOPDisposition : bool { Reporting , Enforce }; 110 109 111 CrossOriginOpenerPolicy obtainCrossOriginOpenerPolicy(const ResourceResponse&, const ScriptExecutionContext&); 110 112 WEBCORE_EXPORT void addCrossOriginOpenerPolicyHeaders(ResourceResponse&, const CrossOriginOpenerPolicy&); 113 void sendViolationReportWhenNavigatingToCOOPResponse(Frame&, CrossOriginOpenerPolicy, COOPDisposition, const URL& coopURL, const URL& previousResponseURL, const SecurityOrigin& coopOrigin, const SecurityOrigin& previousResponseOrigin, const String& referrer, const String& userAgent); 114 void sendViolationReportWhenNavigatingAwayFromCOOPResponse(Frame&, CrossOriginOpenerPolicy, COOPDisposition, const URL& coopURL, const URL& nextResponseURL, const SecurityOrigin& coopOrigin, const SecurityOrigin& nextResponseOrigin, bool isCOOPResponseNavigationSource, const String& userAgent); 111 115 112 116 } // namespace WebCore -
trunk/Source/WebCore/loader/DocumentLoader.cpp
r282084 r282305 80 80 #include "ProgressTracker.h" 81 81 #include "Quirks.h" 82 #include "ReportingEndpointsCache.h" 82 83 #include "ResourceHandle.h" 83 84 #include "ResourceLoadObserver.h" … … 633 634 634 635 bool didReceiveRedirectResponse = !redirectResponse.isNull(); 636 if (didReceiveRedirectResponse && m_frame->isMainFrame()) { 637 if (auto reportingEndpointsCache = m_frame->page() ? m_frame->page()->reportingEndpointsCache() : nullptr) 638 reportingEndpointsCache->addEndPointsFromResponse(redirectResponse); 639 } 640 635 641 if (!frameLoader()->checkIfFormActionAllowedByCSP(newRequest.url(), didReceiveRedirectResponse)) { 636 642 DOCUMENTLOADER_RELEASE_LOG("willSendRequest: canceling - form action not allowed by CSP"); … … 758 764 759 765 return true; 766 } 767 768 // https://html.spec.whatwg.org/multipage/origin.html#check-bcg-switch-navigation-report-only 769 static bool checkIfEnforcingReportOnlyCOOPWouldRequireBrowsingContextGroupSwitch(bool isInitialAboutBlank, const CrossOriginOpenerPolicy& activeDocumentCOOP, const SecurityOrigin& activeDocumentNavigationOrigin, const CrossOriginOpenerPolicy& responseCOOP, const SecurityOrigin& responseOrigin) 770 { 771 if (!checkIfCOOPValuesRequireBrowsingContextGroupSwitch(isInitialAboutBlank, activeDocumentCOOP.reportOnlyValue, activeDocumentNavigationOrigin, responseCOOP.reportOnlyValue, responseOrigin)) 772 return false; 773 774 if (checkIfCOOPValuesRequireBrowsingContextGroupSwitch(isInitialAboutBlank, activeDocumentCOOP.reportOnlyValue, activeDocumentNavigationOrigin, responseCOOP.value, responseOrigin)) 775 return true; 776 777 if (checkIfCOOPValuesRequireBrowsingContextGroupSwitch(isInitialAboutBlank, activeDocumentCOOP.value, activeDocumentNavigationOrigin, responseCOOP.reportOnlyValue, responseOrigin)) 778 return true; 779 780 return false; 760 781 } 761 782 … … 814 835 currentContextIsSource, 815 836 }; 837 if (SecurityPolicy::shouldInheritSecurityOriginFromOwner(m_frame->document()->url())) { 838 if (auto openerFrame = m_frame->loader().opener()) { 839 if (auto openerDocument = openerFrame->document()) 840 m_currentCoopEnforcementResult->url = openerDocument->url(); 841 } 842 } 816 843 } 817 844 … … 825 852 }; 826 853 827 if (checkIfCOOPValuesRequireBrowsingContextGroupSwitch(frameLoader()->stateMachine().isDisplayingInitialEmptyDocument(), m_currentCoopEnforcementResult->crossOriginOpenerPolicy.value, m_currentCoopEnforcementResult->currentOrigin, responseCOOP.value, responseOrigin)) 854 if (checkIfCOOPValuesRequireBrowsingContextGroupSwitch(frameLoader()->stateMachine().isDisplayingInitialEmptyDocument(), m_currentCoopEnforcementResult->crossOriginOpenerPolicy.value, m_currentCoopEnforcementResult->currentOrigin, responseCOOP.value, responseOrigin)) { 828 855 newCOOPEnforcementResult.needsBrowsingContextGroupSwitch = true; 856 857 // FIXME: Add the concept of browsing context group like in the specification instead of treating the whole process as a group. 858 if (Page::nonUtilityPageCount() > 1) { 859 sendViolationReportWhenNavigatingToCOOPResponse(*m_frame, responseCOOP, COOPDisposition::Enforce, responseURL, m_currentCoopEnforcementResult->url, responseOrigin, m_currentCoopEnforcementResult->currentOrigin, m_request.httpReferrer(), m_request.httpUserAgent()); 860 sendViolationReportWhenNavigatingAwayFromCOOPResponse(*m_frame, m_currentCoopEnforcementResult->crossOriginOpenerPolicy, COOPDisposition::Enforce, m_currentCoopEnforcementResult->url, responseURL, m_currentCoopEnforcementResult->currentOrigin, responseOrigin, m_currentCoopEnforcementResult->isCurrentContextNavigationSource, m_request.httpUserAgent()); 861 } 862 } 863 864 if (checkIfEnforcingReportOnlyCOOPWouldRequireBrowsingContextGroupSwitch(frameLoader()->stateMachine().isDisplayingInitialEmptyDocument(), m_currentCoopEnforcementResult->crossOriginOpenerPolicy, m_currentCoopEnforcementResult->currentOrigin, responseCOOP, responseOrigin)) { 865 newCOOPEnforcementResult.needsBrowsingContextGroupSwitchDueToReportOnly = true; 866 867 // FIXME: Add the concept of browsing context group like in the specification instead of treating the whole process as a group. 868 if (Page::nonUtilityPageCount() > 1) { 869 sendViolationReportWhenNavigatingToCOOPResponse(*m_frame, responseCOOP, COOPDisposition::Reporting, responseURL, m_currentCoopEnforcementResult->url, responseOrigin, m_currentCoopEnforcementResult->currentOrigin, m_request.httpReferrer(), m_request.httpUserAgent()); 870 sendViolationReportWhenNavigatingAwayFromCOOPResponse(*m_frame, m_currentCoopEnforcementResult->crossOriginOpenerPolicy, COOPDisposition::Reporting, m_currentCoopEnforcementResult->url, responseURL, m_currentCoopEnforcementResult->currentOrigin, responseOrigin, m_currentCoopEnforcementResult->isCurrentContextNavigationSource, m_request.httpUserAgent()); 871 } 872 } 829 873 830 874 return newCOOPEnforcementResult; … … 987 1031 if (willLoadFallback) 988 1032 return; 1033 1034 if (m_frame->isMainFrame()) { 1035 if (auto reportingEndpointsCache = m_frame->page() ? m_frame->page()->reportingEndpointsCache() : nullptr) 1036 reportingEndpointsCache->addEndPointsFromResponse(response); 1037 } 989 1038 990 1039 ASSERT(m_identifierForLoadWithoutResourceLoader || m_mainResource); -
trunk/Source/WebCore/loader/PingLoader.cpp
r277865 r282305 175 175 request.setHTTPContentType("application/json"_s); 176 176 break; 177 case ViolationReportType::StandardReportingAPIViolation: 178 request.setHTTPContentType("application/reports+json"_s); 179 break; 177 180 } 178 181 … … 185 188 HTTPHeaderMap originalRequestHeader = request.httpHeaderFields(); 186 189 187 frame.loader().updateRequestAndAddExtraFields(request, IsMainResource::No); 190 if (reportType != ViolationReportType::StandardReportingAPIViolation) 191 frame.loader().updateRequestAndAddExtraFields(request, IsMainResource::No); 188 192 189 193 String referrer = SecurityPolicy::generateReferrerHeader(document.referrerPolicy(), reportURL, frame.loader().outgoingReferrer()); … … 191 195 request.setHTTPReferrer(referrer); 192 196 193 startPingLoad(frame, request, WTFMove(originalRequestHeader), ShouldFollowRedirects::No, ContentSecurityPolicyImposition::SkipPolicyCheck, ReferrerPolicy::EmptyString );194 } 195 196 void PingLoader::startPingLoad(Frame& frame, ResourceRequest& request, HTTPHeaderMap&& originalRequestHeaders, ShouldFollowRedirects shouldFollowRedirects, ContentSecurityPolicyImposition policyCheck, ReferrerPolicy referrerPolicy )197 startPingLoad(frame, request, WTFMove(originalRequestHeader), ShouldFollowRedirects::No, ContentSecurityPolicyImposition::SkipPolicyCheck, ReferrerPolicy::EmptyString, reportType); 198 } 199 200 void PingLoader::startPingLoad(Frame& frame, ResourceRequest& request, HTTPHeaderMap&& originalRequestHeaders, ShouldFollowRedirects shouldFollowRedirects, ContentSecurityPolicyImposition policyCheck, ReferrerPolicy referrerPolicy, std::optional<ViolationReportType> violationReportType) 197 201 { 198 202 unsigned long identifier = frame.page()->progress().createUniqueIdentifier(); … … 212 216 options.cache = FetchOptions::Cache::NoCache; 213 217 218 // https://www.w3.org/TR/reporting/#try-delivery 219 if (violationReportType == ViolationReportType::StandardReportingAPIViolation) { 220 options.credentials = FetchOptions::Credentials::SameOrigin; 221 options.mode = FetchOptions::Mode::Cors; 222 options.serviceWorkersMode = ServiceWorkersMode::None; 223 options.destination = FetchOptions::Destination::Report; 224 } 225 214 226 // FIXME: Deprecate the ping load code path. 215 227 if (platformStrategies()->loaderStrategy()->usePingLoad()) { -
trunk/Source/WebCore/loader/PingLoader.h
r244700 r282305 44 44 class ResourceRequest; 45 45 46 enum class ViolationReportType {46 enum class ViolationReportType : uint8_t { 47 47 ContentSecurityPolicy, 48 48 XSSAuditor, 49 StandardReportingAPIViolation // https://www.w3.org/TR/reporting/#try-delivery 49 50 }; 50 51 … … 59 60 private: 60 61 enum class ShouldFollowRedirects { No, Yes }; 61 static void startPingLoad(Frame&, ResourceRequest&, HTTPHeaderMap&& originalRequestHeaders, ShouldFollowRedirects, ContentSecurityPolicyImposition, ReferrerPolicy );62 static void startPingLoad(Frame&, ResourceRequest&, HTTPHeaderMap&& originalRequestHeaders, ShouldFollowRedirects, ContentSecurityPolicyImposition, ReferrerPolicy, std::optional<ViolationReportType> = std::nullopt); 62 63 }; 63 64 -
trunk/Source/WebCore/loader/WorkerThreadableLoader.cpp
r280953 r282305 46 46 #include "ServiceWorkerGlobalScope.h" 47 47 #include "ThreadableLoader.h" 48 #include "WorkerGlobalScope.h" 48 49 #include "WorkerLoaderProxy.h" 49 50 #include "WorkerOrWorkletGlobalScope.h" -
trunk/Source/WebCore/loader/cache/CachedResourceLoader.cpp
r281110 r282305 359 359 ResourceErrorOr<CachedResourceHandle<CachedRawResource>> CachedResourceLoader::requestPingResource(CachedResourceRequest&& request) 360 360 { 361 ASSERT(request.options().destination == FetchOptions::Destination::EmptyString );361 ASSERT(request.options().destination == FetchOptions::Destination::EmptyString || request.options().destination == FetchOptions::Destination::Report); 362 362 return castCachedResourceTo<CachedRawResource>(requestResource(CachedResource::Type::Ping, WTFMove(request))); 363 363 } -
trunk/Source/WebCore/page/Page.cpp
r282191 r282305 118 118 #include "RenderWidget.h" 119 119 #include "RenderingUpdateScheduler.h" 120 #include "ReportingEndpointsCache.h" 120 121 #include "ResizeObserver.h" 121 122 #include "ResourceUsageOverlay.h" … … 329 330 , m_httpsUpgradeEnabled(pageConfiguration.httpsUpgradeEnabled) 330 331 , m_permissionController(WTFMove(pageConfiguration.permissionController)) 332 , m_reportingEndpointsCache(WTFMove(pageConfiguration.reportingEndpointsCache)) 331 333 , m_storageProvider(WTFMove(pageConfiguration.storageProvider)) 332 334 { -
trunk/Source/WebCore/page/Page.h
r282130 r282305 140 140 class ProgressTracker; 141 141 class RenderObject; 142 class ReportingEndpointsCache; 142 143 class ResourceUsageOverlay; 143 144 class RenderingUpdateScheduler; … … 308 309 #endif 309 310 311 ReportingEndpointsCache* reportingEndpointsCache() { return m_reportingEndpointsCache.get(); } 312 310 313 Chrome& chrome() const { return *m_chrome; } 311 314 DragCaretController& dragCaretController() const { return *m_dragCaretController; } … … 1201 1204 1202 1205 Ref<PermissionController> m_permissionController; 1206 RefPtr<ReportingEndpointsCache> m_reportingEndpointsCache; 1203 1207 UniqueRef<StorageProvider> m_storageProvider; 1204 1208 -
trunk/Source/WebCore/page/PageConfiguration.cpp
r282130 r282305 44 44 #include "PluginInfoProvider.h" 45 45 #include "ProgressTrackerClient.h" 46 #include "ReportingEndpointsCache.h" 46 47 #include "SocketProvider.h" 47 48 #include "SpeechRecognitionProvider.h" -
trunk/Source/WebCore/page/PageConfiguration.h
r282130 r282305 63 63 class PluginInfoProvider; 64 64 class ProgressTrackerClient; 65 class ReportingEndpointsCache; 65 66 class SocketProvider; 66 67 class SpeechRecognitionProvider; … … 134 135 UniqueRef<SpeechRecognitionProvider> speechRecognitionProvider; 135 136 UniqueRef<MediaRecorderProvider> mediaRecorderProvider; 137 RefPtr<ReportingEndpointsCache> reportingEndpointsCache; 136 138 137 139 // FIXME: These should be all be Settings. -
trunk/Source/WebCore/platform/network/HTTPHeaderNames.in
r280504 r282305 84 84 Referrer-Policy 85 85 Refresh 86 Report-To 86 87 Sec-WebSocket-Accept 87 88 Sec-WebSocket-Extensions -
trunk/Source/WebKit/ChangeLog
r282295 r282305 1 2021-09-10 Chris Dumez <cdumez@apple.com> 2 3 Implement navigation reporting for Cross-Origin-Opener-Policy 4 https://bugs.webkit.org/show_bug.cgi?id=230046 5 6 Reviewed by Alex Christensen. 7 8 * NetworkProcess/NetworkConnectionToWebProcess.cpp: 9 (WebKit::NetworkConnectionToWebProcess::didCleanupResourceLoader): 10 Now that we may abort expired loaders that are cached on the NetworkSession 11 (because awaiting transfer to another web process connection), we would hit 12 this assertion because the loader is not associated with this connection 13 anymore at the point it is adopted. For this reason, I silenced this 14 assertion. 15 16 * NetworkProcess/NetworkSession.cpp: 17 (WebKit::NetworkSession::CachedNetworkResourceLoader::expirationTimerFired): 18 Abort the loader before destroying it to avoid hitting an assertion in the 19 destructor (loaders cannot be loading at the point they are destroyed). 20 1 21 2021-09-10 Stephan Szabo <stephan.szabo@sony.com> 2 22 -
trunk/Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.cpp
r281706 r282305 176 176 } 177 177 178 ASSERT(m_networkResourceLoaders.get(loader.coreIdentifier()) == &loader);179 178 m_networkResourceLoaders.remove(loader.coreIdentifier()); 180 179 } -
trunk/Source/WebKit/NetworkProcess/NetworkSession.cpp
r282269 r282305 430 430 431 431 auto loader = session->takeLoaderAwaitingWebProcessTransfer(m_loader->identifier()); 432 ASSERT_UNUSED(loader, loader); 432 ASSERT(loader); 433 if (loader) 434 loader->abort(); 433 435 } 434 436 -
trunk/Source/WebKit/WebProcess/WebPage/WebPage.cpp
r282191 r282305 232 232 #include <WebCore/RenderTreeAsText.h> 233 233 #include <WebCore/RenderView.h> 234 #include <WebCore/ReportingEndpointsCache.h> 234 235 #include <WebCore/ResourceLoadStatistics.h> 235 236 #include <WebCore/ResourceRequest.h> … … 605 606 pageConfiguration.storageNamespaceProvider = WebStorageNamespaceProvider::getOrCreate(*m_pageGroup); 606 607 pageConfiguration.visitedLinkStore = VisitedLinkTableController::getOrCreate(parameters.visitedLinkTableID); 608 pageConfiguration.reportingEndpointsCache = &WebProcess::singleton().reportingEndpointsCache(); 607 609 608 610 #if ENABLE(APPLE_PAY) -
trunk/Source/WebKit/WebProcess/WebProcess.cpp
r281832 r282305 127 127 #include <WebCore/RegistrableDomain.h> 128 128 #include <WebCore/RemoteCommandListener.h> 129 #include <WebCore/ReportingEndpointsCache.h> 129 130 #include <WebCore/ResourceLoadStatistics.h> 130 131 #include <WebCore/RuntimeApplicationChecks.h> … … 275 276 , m_broadcastChannelRegistry(WebBroadcastChannelRegistry::create()) 276 277 , m_cookieJar(WebCookieJar::create()) 278 , m_reportingEndpointsCache(ReportingEndpointsCache::create()) 277 279 , m_dnsPrefetchHystereris([this](PAL::HysteresisState state) { if (state == PAL::HysteresisState::Stopped) m_dnsPrefetchedHosts.clear(); }) 278 280 #if ENABLE(NETSCAPE_PLUGIN_API) -
trunk/Source/WebKit/WebProcess/WebProcess.h
r281398 r282305 95 95 class PageGroup; 96 96 class RegistrableDomain; 97 class ReportingEndpointsCache; 97 98 class ResourceRequest; 98 99 class UserGestureToken; … … 341 342 WebCookieJar& cookieJar() { return m_cookieJar.get(); } 342 343 WebSocketChannelManager& webSocketChannelManager() { return m_webSocketChannelManager; } 344 WebCore::ReportingEndpointsCache& reportingEndpointsCache() { return m_reportingEndpointsCache.get(); } 343 345 344 346 #if PLATFORM(IOS_FAMILY) && !PLATFORM(MACCATALYST) … … 663 665 Ref<WebBroadcastChannelRegistry> m_broadcastChannelRegistry; 664 666 Ref<WebCookieJar> m_cookieJar; 667 Ref<WebCore::ReportingEndpointsCache> m_reportingEndpointsCache; 665 668 WebSocketChannelManager m_webSocketChannelManager; 666 669 -
trunk/Tools/ChangeLog
r282302 r282305 1 2021-09-10 Chris Dumez <cdumez@apple.com> 2 3 Implement navigation reporting for Cross-Origin-Opener-Policy 4 https://bugs.webkit.org/show_bug.cgi?id=230046 5 6 Reviewed by Alex Christensen. 7 8 Fix issue where [DumpJSConsoleLogInStdErr] was not working for tests that process-swap 9 due to COOP. Some data members on InjectedBundle such as m_dumpJSConsoleLogInStdErr 10 were only set in didReceiveMessageToPage(), before calling beginTesting(). However, in 11 case of process-swap, beginTesting() gets called a second time in the new process, from 12 InjectedBundle::didCreatePage() with BegingTestingMode::Resume. As a result, the 13 m_dumpJSConsoleLogInStdErr flag was not getting set in the new process' injected bundle 14 after a process-swap. To address the issue, those data members now get initialized in 15 beginTesting() instead. 16 17 * WebKitTestRunner/InjectedBundle/InjectedBundle.cpp: 18 (WTR::InjectedBundle::didReceiveMessageToPage): 19 (WTR::InjectedBundle::beginTesting): 20 1 21 2021-09-10 Jonathan Bedard <jbedard@apple.com> 2 22 -
trunk/Tools/WebKitTestRunner/InjectedBundle/InjectedBundle.cpp
r282004 r282305 193 193 ASSERT(messageBody); 194 194 auto messageBodyDictionary = dictionaryValue(messageBody); 195 m_dumpPixels = booleanValue(messageBodyDictionary, "DumpPixels");196 m_timeout = Seconds::fromMilliseconds(uint64Value(messageBodyDictionary, "Timeout"));197 m_dumpJSConsoleLogInStdErr = booleanValue(messageBodyDictionary, "DumpJSConsoleLogInStdErr");198 195 WKBundlePagePostMessage(page, toWK("Ack").get(), toWK("BeginTest").get()); 199 196 beginTesting(messageBodyDictionary, BegingTestingMode::New); … … 492 489 m_state = Testing; 493 490 491 m_dumpPixels = booleanValue(settings, "DumpPixels"); 492 m_timeout = Seconds::fromMilliseconds(uint64Value(settings, "Timeout")); 493 m_dumpJSConsoleLogInStdErr = booleanValue(settings, "DumpJSConsoleLogInStdErr"); 494 494 495 m_pixelResult.clear(); 495 496 m_repaintRects.clear();
Note: See TracChangeset
for help on using the changeset viewer.