Bug 1716778 [wpt PR 29398] - [CSP] Add WPT for reports sent by workers, a=testonly
commit533a409ed898f48b62744046f1dad7e83f9bc906
authorAntonio Sartori <antoniosartori@chromium.org>
Fri, 25 Jun 2021 22:10:48 +0000 (25 22:10 +0000)
committermoz-wptsync-bot <wptsync@mozilla.com>
Sat, 26 Jun 2021 22:32:59 +0000 (26 22:32 +0000)
tree5dc95138b586cfe64cbea618cc67381d37844bfd
parente8ec157547f270fa9f82ee75dcaa3e10a54df2be
Bug 1716778 [wpt PR 29398] - [CSP] Add WPT for reports sent by workers, a=testonly

Automatic update from web-platform-tests
[CSP] Add WPT for reports sent by workers

This CL adds Web Platform Tests for Content Security Policy, checking
that dedicated and shared workers send reports on violations.

The tests are failing at the moment, since chrome does not support
reporting for workers yet. This fill we fixed in a follow-up patch.

This CL also fixes the dedicated worker tests to check that CSP are
not inherited by the creator. Chrome implements the wrong behaviour
here, and that should be addressed in a separate change.

Bug: 929370,1012640
Change-Id: Iaf4c4db42714948315376986673e6e1385e566a9
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2965920
Reviewed-by: Arthur Sonzogni <arthursonzogni@chromium.org>
Commit-Queue: Antonio Sartori <antoniosartori@chromium.org>
Cr-Commit-Position: refs/heads/master@{#893457}

--

wpt-commits: 59165f0508d907c4c57e80f91679353be866a93d
wpt-pr: 29398
27 files changed:
testing/web-platform/tests/content-security-policy/inside-worker/dedicated-inheritance.html [deleted file]
testing/web-platform/tests/content-security-policy/inside-worker/dedicated-script.html [deleted file]
testing/web-platform/tests/content-security-policy/inside-worker/dedicated-worker-report-only.html [deleted file]
testing/web-platform/tests/content-security-policy/inside-worker/dedicated-worker-report-only.html.headers [deleted file]
testing/web-platform/tests/content-security-policy/inside-worker/dedicatedworker-connect-src.html [new file with mode: 0644]
testing/web-platform/tests/content-security-policy/inside-worker/dedicatedworker-connect-src.html.sub.headers [new file with mode: 0644]
testing/web-platform/tests/content-security-policy/inside-worker/dedicatedworker-report-only.html [new file with mode: 0644]
testing/web-platform/tests/content-security-policy/inside-worker/dedicatedworker-report-only.html.sub.headers [new file with mode: 0644]
testing/web-platform/tests/content-security-policy/inside-worker/dedicatedworker-script-src.html [new file with mode: 0644]
testing/web-platform/tests/content-security-policy/inside-worker/dedicatedworker-script-src.html.sub.headers [new file with mode: 0644]
testing/web-platform/tests/content-security-policy/inside-worker/serviceworker-connect-src.https.sub.html [new file with mode: 0644]
testing/web-platform/tests/content-security-policy/inside-worker/serviceworker-report-only.https.sub.html [new file with mode: 0644]
testing/web-platform/tests/content-security-policy/inside-worker/serviceworker-script-src.https.sub.html [new file with mode: 0644]
testing/web-platform/tests/content-security-policy/inside-worker/shared-inheritance.html [deleted file]
testing/web-platform/tests/content-security-policy/inside-worker/shared-script.html [deleted file]
testing/web-platform/tests/content-security-policy/inside-worker/shared-worker-report-only.html [deleted file]
testing/web-platform/tests/content-security-policy/inside-worker/sharedworker-connect-src.sub.html [new file with mode: 0644]
testing/web-platform/tests/content-security-policy/inside-worker/sharedworker-report-only.sub.html [new file with mode: 0644]
testing/web-platform/tests/content-security-policy/inside-worker/sharedworker-script-src.sub.html [new file with mode: 0644]
testing/web-platform/tests/content-security-policy/inside-worker/support/connect-src-allow.sub.js
testing/web-platform/tests/content-security-policy/inside-worker/support/connect-src-self-report-only.sub.js
testing/web-platform/tests/content-security-policy/inside-worker/support/connect-src-self-report-only.sub.js.sub.headers [moved from testing/web-platform/tests/content-security-policy/inside-worker/support/connect-src-self-report-only.sub.js.headers with 54% similarity]
testing/web-platform/tests/content-security-policy/inside-worker/support/connect-src-self.sub.js
testing/web-platform/tests/content-security-policy/inside-worker/support/script-src-allow.sub.js
testing/web-platform/tests/content-security-policy/inside-worker/support/script-src-self.sub.js
testing/web-platform/tests/content-security-policy/support/checkReport.sub.js
testing/web-platform/tests/reporting/resources/report.py