Scripts injected via `new Function()` are not allowed with `strict-dynamic` without `unsafe-eval`.

Summary

Harness status: OK

Found 1 tests

Details

ResultTest NameMessage
PassScript injected via 'eval' is not allowed with 'strict-dynamic' without 'unsafe-eval'.
Asserts run
Pass
assert_throws_js(function "function Error() { [native code] }", function "function() {                     try {                         new Function('newFunctionScriptRan = true;')();                     } catch (e) {                         throw new Error();                     }                 }")
    at Test.<anonymous> ( /content-security-policy/script-src/script-src-strict_dynamic_new_function.html:25:13)
Pass
assert_false(false)
    at Test.<anonymous> ( /content-security-policy/script-src/script-src-strict_dynamic_new_function.html:21:17)
Pass
assert_equals("script-src", "script-src")
    at Test.<anonymous> ( /content-security-policy/script-src/script-src-strict_dynamic_new_function.html:22:17)