chromium/third_party/blink/web_tests/http/tests/security/contentSecurityPolicy/worklet-import-blocked.html

<!DOCTYPE html>
<html>
<head>
    <script src="../../resources/testharness.js"></script>
    <script src="../../resources/testharnessreport.js"></script>
<meta http-equiv="Content-Security-Policy" content="default-src 'none';script-src 'unsafe-inline'"/>

</head>
<body>
<script>
    promise_test(function() {

        return CSS.paintWorklet.addModule('/resources/worklet.js').then(
            function(undefined_arg) {
                assert_unreached('addModule should fail.')
            },
            function(error) {
                assert_equals(error.name, 'AbortError', 'error should be an AbortError.');
            });

    }, 'Importing a script rejects the given promise with AbortError because it violated the same origin CSP policy.');
</script>
</body>
</html>