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