From a7750961fd7358f45c9e83dae5be6f9a6169ca2f Mon Sep 17 00:00:00 2001 From: Saeid Eid Date: Fri, 23 Feb 2024 04:25:41 +0000 Subject: [PATCH] Bug 1881014 [wpt PR 44672] - Remove required attributes from SecurityPolicyViolationEventInit, a=testonly Automatic update from web-platform-tests Remove required attributes from SecurityPolicyViolationEventInit The dictionary SecurityPolicyViolationEventInit is optional in the constructor of SecurityPolicyViolationEvent. This CL removes the required attributes from the properties of this dictionary and adds default values. The change in the spec: https://github.com/w3c/webappsec-csp/pull/645 Bug: 325291983 Change-Id: I61e5527e7e8ccc2cd35e5022397ff42bf83ccd9e Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5296364 Reviewed-by: Antonio Sartori Reviewed-by: Jonathan Hao Commit-Queue: Saeid Eid Reviewed-by: Mike West Cr-Commit-Position: refs/heads/main@{#1263930} -- wpt-commits: c333c3295d253747283111627a0b96a96dbf27ad wpt-pr: 44672 --- .../constructor-required-fields.html | 213 +++++++++--------- 1 file changed, 103 insertions(+), 110 deletions(-) diff --git a/testing/web-platform/tests/content-security-policy/securitypolicyviolation/constructor-required-fields.html b/testing/web-platform/tests/content-security-policy/securitypolicyviolation/constructor-required-fields.html index 1a090d8e2c460..1f30e38b0c254 100644 --- a/testing/web-platform/tests/content-security-policy/securitypolicyviolation/constructor-required-fields.html +++ b/testing/web-platform/tests/content-security-policy/securitypolicyviolation/constructor-required-fields.html @@ -25,118 +25,111 @@ }), undefined); }, "SecurityPolicyViolationEvent constructor works with an init dict"); - // missing required members + // missing optional members test(function() { - assert_throws_js(TypeError, - function() { new SecurityPolicyViolationEvent("securitypolicyviolation", { - // documentURI: "http://example.com", - referrer: "http://example.com", - blockedURI: "http://example.com", - violatedDirective: "default-src", - effectiveDirective: "default-src", - originalPolicy: "default-src 'none'", - sourceFile: "example.js", - sample: "