From ffc4eee19095496be8df92855e3c366af7806086 Mon Sep 17 00:00:00 2001 From: arthursonzogni Date: Thu, 5 Mar 2020 21:33:26 +0000 Subject: [PATCH] Bug 1618897 [wpt PR 22021] - [CSP] Factorize SVGElement & MHTMLElement nonce hiding., a=testonly MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Automatic update from web-platform-tests [CSP] Factorize SVGElement & MHTMLElement nonce hiding. According to: https://github.com/whatwg/html/pull/2373 html and svg Element are hiding their nonce when there are at least one Content-Security-Policy defined from an HTTP header. The two implementation: - HTMLElement::InsertedInto - SVGElement::InsertedInto were hidding the nonce slightly differently. To prevent further divergence, factorize this implementation into Element::HideNonce() and call it from both places. Bug: 1053496 Change-Id: I3cbad88f70c61591bef060d4188c82388e6001d2 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2078536 Commit-Queue: Arthur Sonzogni Reviewed-by: Mike West Reviewed-by: Fredrik Söderquist Cr-Commit-Position: refs/heads/master@{#746837} -- wpt-commits: 06705ea82c8a9d1866665c8abd069dd3b0f8c12b wpt-pr: 22021 --- .../nonce-hiding/nonces.html | 84 +++++++++++++------ 1 file changed, 58 insertions(+), 26 deletions(-) diff --git a/testing/web-platform/tests/content-security-policy/nonce-hiding/nonces.html b/testing/web-platform/tests/content-security-policy/nonce-hiding/nonces.html index b023d060323d9..7ee10a7b29e5a 100644 --- a/testing/web-platform/tests/content-security-policy/nonce-hiding/nonces.html +++ b/testing/web-platform/tests/content-security-policy/nonce-hiding/nonces.html @@ -3,30 +3,62 @@