Pass | eval with plain string with Trusted Types and permissive CSP throws (no type). | Asserts runPass | assert_throws_js(function "function EvalError() { [native code] }", function "_ => { eval('a="hello there"'); }")
at Test.<anonymous> ( /trusted-types/eval-with-permissive-csp.html:17:5) | Pass | assert_equals(0, 0)
at Test.<anonymous> ( /trusted-types/eval-with-permissive-csp.html:20:5) |
|
Pass | indirect eval with plain string with Trusted Types and permissive CSP throws (no type). | Asserts runPass | assert_throws_js(function "function EvalError() { [native code] }", function "_ => { eval?.('a="hello there"'); }")
at Test.<anonymous> ( /trusted-types/eval-with-permissive-csp.html:25:5) | Pass | assert_equals(0, 0)
at Test.<anonymous> ( /trusted-types/eval-with-permissive-csp.html:28:5) |
|
Pass | Function constructor with plain string with Trusted Types and permissive CSP throws (no type). | Asserts runPass | assert_throws_js(function "function EvalError() { [native code] }", function "_ => { new Function('a="hello there"'); }")
at Test.<anonymous> ( /trusted-types/eval-with-permissive-csp.html:33:5) | Pass | assert_equals(0, 0)
at Test.<anonymous> ( /trusted-types/eval-with-permissive-csp.html:36:5) |
|
Pass | eval with TrustedScript and permissive CSP works. | Asserts runPass | assert_equals("Hello a cat string", "Hello a cat string")
at Test.<anonymous> ( /trusted-types/eval-with-permissive-csp.html:41:5) |
|
Pass | indirect eval with TrustedScript and permissive CSP works. | Asserts runPass | assert_equals("Hello a cat string", "Hello a cat string")
at Test.<anonymous> ( /trusted-types/eval-with-permissive-csp.html:46:5) |
|
Fail | new Function with TrustedScript and permissive CSP works. | Refused to evaluate a string as JavaScript because this document requires 'Trusted Type' assignment.EvalError: Refused to evaluate a string as JavaScript because this document requires 'Trusted Type' assignment.
at new Function (<anonymous>)
at Test.<anonymous> (https://not-wpt.live/trusted-types/eval-with-permissive-csp.html:50:13)
at Test.step (https://not-wpt.live/resources/testharness.js:2642:25)
at test (https://not-wpt.live/resources/testharness.js:633:30)
at https://not-wpt.live/trusted-types/eval-with-permissive-csp.html:49:3 Asserts runNo asserts ran |
Pass | eval with plain string with Trusted Types and permissive CSP works with default policy. | Asserts runPass | assert_equals(2, 2)
at Test.<anonymous> ( /trusted-types/eval-with-permissive-csp.html:57:5) |
|
Pass | indirect eval with plain string with Trusted Types and permissive CSP works with default policy. | Asserts runPass | assert_equals(2, 2)
at Test.<anonymous> ( /trusted-types/eval-with-permissive-csp.html:62:5) |
|
Pass | new Function with plain string default policy and permissive CSP works with default policy. | Asserts runPass | assert_equals(2, 2)
at Test.<anonymous> ( /trusted-types/eval-with-permissive-csp.html:67:5) |
|