From 979c58300e88b9e5775149eca244f2c150f6a68c Mon Sep 17 00:00:00 2001 From: Anne van Kesteren Date: Fri, 21 Feb 2020 21:57:11 +0000 Subject: [PATCH] Bug 1616251 [wpt PR 21853] - nonce attribute: no longer tentative, a=testonly Automatic update from web-platform-tests nonce attribute: no longer tentative For https://github.com/whatwg/html/pull/5300. Supersedes #5423 -- wpt-commits: 2ca72d0f4b39e6007ae10e78d25f352dab56b2d2 wpt-pr: 21853 --HG-- rename : testing/web-platform/tests/content-security-policy/nonce-hiding/script-nonces-hidden.tentative.html.headers => testing/web-platform/tests/content-security-policy/nonce-hiding/script-nonces-hidden.html.headers rename : testing/web-platform/tests/content-security-policy/nonce-hiding/svgscript-nonces-hidden.tentative.html.headers => testing/web-platform/tests/content-security-policy/nonce-hiding/svgscript-nonces-hidden.html.headers --- .../nonce-hiding/nonces.html | 32 +++++++++++++++++++ .../nonce-hiding/nonces.html.headers | 1 + ...tml => script-nonces-hidden-meta.sub.html} | 15 +++++---- ...ntative.html => script-nonces-hidden.html} | 15 +++++---- ...ders => script-nonces-hidden.html.headers} | 0 ... => svgscript-nonces-hidden-meta.sub.html} | 18 ----------- ...tive.html => svgscript-nonces-hidden.html} | 18 ----------- ...s => svgscript-nonces-hidden.html.headers} | 0 8 files changed, 49 insertions(+), 50 deletions(-) create mode 100644 testing/web-platform/tests/content-security-policy/nonce-hiding/nonces.html create mode 100644 testing/web-platform/tests/content-security-policy/nonce-hiding/nonces.html.headers rename testing/web-platform/tests/content-security-policy/nonce-hiding/{script-nonces-hidden-meta.tentative.sub.html => script-nonces-hidden-meta.sub.html} (91%) rename testing/web-platform/tests/content-security-policy/nonce-hiding/{script-nonces-hidden.tentative.html => script-nonces-hidden.html} (93%) rename testing/web-platform/tests/content-security-policy/nonce-hiding/{script-nonces-hidden.tentative.html.headers => script-nonces-hidden.html.headers} (100%) rename testing/web-platform/tests/content-security-policy/nonce-hiding/{svgscript-nonces-hidden-meta.tentative.sub.html => svgscript-nonces-hidden-meta.sub.html} (84%) rename testing/web-platform/tests/content-security-policy/nonce-hiding/{svgscript-nonces-hidden.tentative.html => svgscript-nonces-hidden.html} (85%) rename testing/web-platform/tests/content-security-policy/nonce-hiding/{svgscript-nonces-hidden.tentative.html.headers => svgscript-nonces-hidden.html.headers} (100%) 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 new file mode 100644 index 0000000000000..e7bada96f94f8 --- /dev/null +++ b/testing/web-platform/tests/content-security-policy/nonce-hiding/nonces.html @@ -0,0 +1,32 @@ + + + +
+ diff --git a/testing/web-platform/tests/content-security-policy/nonce-hiding/nonces.html.headers b/testing/web-platform/tests/content-security-policy/nonce-hiding/nonces.html.headers new file mode 100644 index 0000000000000..daf482b5aba4f --- /dev/null +++ b/testing/web-platform/tests/content-security-policy/nonce-hiding/nonces.html.headers @@ -0,0 +1 @@ +Content-Security-Policy: img-src 'none' diff --git a/testing/web-platform/tests/content-security-policy/nonce-hiding/script-nonces-hidden-meta.tentative.sub.html b/testing/web-platform/tests/content-security-policy/nonce-hiding/script-nonces-hidden-meta.sub.html similarity index 91% rename from testing/web-platform/tests/content-security-policy/nonce-hiding/script-nonces-hidden-meta.tentative.sub.html rename to testing/web-platform/tests/content-security-policy/nonce-hiding/script-nonces-hidden-meta.sub.html index b15fcfa30b5ae..f8e5b946f0002 100644 --- a/testing/web-platform/tests/content-security-policy/nonce-hiding/script-nonces-hidden-meta.tentative.sub.html +++ b/testing/web-platform/tests/content-security-policy/nonce-hiding/script-nonces-hidden-meta.sub.html @@ -72,6 +72,8 @@ var s = document.createElement('script'); s.innerText = script.innerText; s.nonce = 'abc'; + assert_equals(s.nonce, 'abc'); + assert_equals(s.getAttribute('nonce'), null); document.head.appendChild(s); assert_equals(s.nonce, 'abc'); assert_equals(s.getAttribute('nonce'), null); @@ -119,12 +121,11 @@ #cssTest[nonce=abc] { background: url(/security/resources/abe.png); } diff --git a/testing/web-platform/tests/content-security-policy/nonce-hiding/script-nonces-hidden.tentative.html b/testing/web-platform/tests/content-security-policy/nonce-hiding/script-nonces-hidden.html similarity index 93% rename from testing/web-platform/tests/content-security-policy/nonce-hiding/script-nonces-hidden.tentative.html rename to testing/web-platform/tests/content-security-policy/nonce-hiding/script-nonces-hidden.html index 4b717b9b2a04b..b32635ff65817 100644 --- a/testing/web-platform/tests/content-security-policy/nonce-hiding/script-nonces-hidden.tentative.html +++ b/testing/web-platform/tests/content-security-policy/nonce-hiding/script-nonces-hidden.html @@ -73,6 +73,8 @@ var s = document.createElement('script'); s.innerText = script.innerText; s.nonce = 'abc'; + assert_equals(s.nonce, 'abc'); + assert_equals(s.getAttribute('nonce'), null); document.head.appendChild(s); assert_equals(s.nonce, 'abc'); assert_equals(s.getAttribute('nonce'), null); @@ -160,12 +162,11 @@ #cssTest[nonce=abc] { background: url(/security/resources/abe.png); } diff --git a/testing/web-platform/tests/content-security-policy/nonce-hiding/script-nonces-hidden.tentative.html.headers b/testing/web-platform/tests/content-security-policy/nonce-hiding/script-nonces-hidden.html.headers similarity index 100% rename from testing/web-platform/tests/content-security-policy/nonce-hiding/script-nonces-hidden.tentative.html.headers rename to testing/web-platform/tests/content-security-policy/nonce-hiding/script-nonces-hidden.html.headers diff --git a/testing/web-platform/tests/content-security-policy/nonce-hiding/svgscript-nonces-hidden-meta.tentative.sub.html b/testing/web-platform/tests/content-security-policy/nonce-hiding/svgscript-nonces-hidden-meta.sub.html similarity index 84% rename from testing/web-platform/tests/content-security-policy/nonce-hiding/svgscript-nonces-hidden-meta.tentative.sub.html rename to testing/web-platform/tests/content-security-policy/nonce-hiding/svgscript-nonces-hidden-meta.sub.html index bd1c33760d083..0bdf2ab8f488b 100644 --- a/testing/web-platform/tests/content-security-policy/nonce-hiding/svgscript-nonces-hidden-meta.tentative.sub.html +++ b/testing/web-platform/tests/content-security-policy/nonce-hiding/svgscript-nonces-hidden-meta.sub.html @@ -96,21 +96,3 @@ assert_equals(innerScript.getAttribute('nonce'), 'abc', "Post-insertion content"); }, "createElement.setAttribute."); - - - - - - diff --git a/testing/web-platform/tests/content-security-policy/nonce-hiding/svgscript-nonces-hidden.tentative.html b/testing/web-platform/tests/content-security-policy/nonce-hiding/svgscript-nonces-hidden.html similarity index 85% rename from testing/web-platform/tests/content-security-policy/nonce-hiding/svgscript-nonces-hidden.tentative.html rename to testing/web-platform/tests/content-security-policy/nonce-hiding/svgscript-nonces-hidden.html index 8c0e58b1d1d24..d6e9379d4710b 100644 --- a/testing/web-platform/tests/content-security-policy/nonce-hiding/svgscript-nonces-hidden.tentative.html +++ b/testing/web-platform/tests/content-security-policy/nonce-hiding/svgscript-nonces-hidden.html @@ -96,21 +96,3 @@ assert_equals(innerScript.getAttribute('nonce'), '', "Post-insertion content"); }, "createElement.setAttribute."); - - - - - - diff --git a/testing/web-platform/tests/content-security-policy/nonce-hiding/svgscript-nonces-hidden.tentative.html.headers b/testing/web-platform/tests/content-security-policy/nonce-hiding/svgscript-nonces-hidden.html.headers similarity index 100% rename from testing/web-platform/tests/content-security-policy/nonce-hiding/svgscript-nonces-hidden.tentative.html.headers rename to testing/web-platform/tests/content-security-policy/nonce-hiding/svgscript-nonces-hidden.html.headers